source: MondoRescue/branches/2.05/mondo/configure.in @ 213

Last change on this file since 213 was 213, checked in by bcornec, 15 years ago

removed AuX_VER
removed g_version
use only VERSION from config.h
add $Rev$ to VERSION

  • Property svn:keywords set to Id Rev
File size: 5.3 KB
Line 
1dnl Autoconfigure file for Mondo Rescue v2.0x
2dnl Mondo by Hugo Rabson
3dnl This script by Joshua Oreman
4dnl
5dnl Process this file with autoconf >=2.53 to produce a configure script.
6dnl
7dnl $Id: configure.in 213 2005-12-15 00:41:46Z bcornec $
8dnl
9MONDO_VER=2.05
10MONDO_REV=`echo '$Rev: 213 $' | awk '{print $2}'`
11AC_INIT([Mondo Rescue],[${MONDO_VER}-r$MONDO_REV],[mondo-devel@lists.sourceforge.net])
12AC_CONFIG_SRCDIR([mondo/mondoarchive/main.c])
13AM_CONFIG_HEADER(config.h)
14
15AC_CANONICAL_HOST
16AC_CANONICAL_TARGET
17AC_ARG_PROGRAM
18
19AM_INIT_AUTOMAKE([mondo], [$MONDO_VER])
20AM_MAINTAINER_MODE
21
22AM_PROG_LIBTOOL
23AC_PROG_CXX
24AC_PROG_AWK
25AC_PROG_CC
26AC_PROG_CPP
27AC_PROG_INSTALL
28AC_PROG_LN_S
29AC_PROG_MAKE_SET
30
31
32dnl --with/--enable stuff
33do_static_mr=
34AC_ARG_ENABLE(x11, AS_HELP_STRING(--enable-x11,Create libXmondo and XMondo for X11/KDE support), do_x=$withval, do_x= )
35AC_ARG_ENABLE(static-mr, AS_HELP_STRING(--enable-static-mr,Link mondorestore statically), do_static_mr=$withval, do_static_mr= )
36AC_ARG_ENABLE(debug, AS_HELP_STRING(--enable-debug,Add debugging flags), CFLAGS="$CFLAGS -g", )
37AC_ARG_WITH(max-noof-media, AS_HELP_STRING(--with-max-noof-media=NUM,Compile for a certain maximum number of media (default 50)), max_noof_media=$withval, max_noof_media=50)
38AC_ARG_WITH(tape-block-size, AS_HELP_STRING(--with-tape-block-size=NUM,Set tape block size in kilobytes (default 131072)), exttape=${withval:=131072}, exttape=131072)
39if test x$do_static_mr = xyes; then
40    MONDORESTORE_STATIC=-static
41else
42    MONDORESTORE_STATIC=
43fi
44AC_SUBST(MONDORESTORE_STATIC)
45AC_DEFINE_UNQUOTED(MAX_NOOF_MEDIA, $max_noof_media, [Maximum number of media])
46AC_DEFINE_UNQUOTED(EXTTAPE, $exttape, [Tape blocksize])
47if test x$do_x = xyes; then
48    AC_DEFINE(WITH_X, 1, [Define if compiled with X support])
49else
50    AC_DEFINE(WITH_X, 0, [Define if compiled with X support])
51fi
52AM_CONDITIONAL(XWIN, test x$do_x = xyes)
53
54# ( which automake 2>/dev/null >/dev/null && ( automake --version 2>&1 | grep -q 1.5 || automake --version 2>&1 | grep -q 1.7 || AC_MSG_ERROR([Automake must be version 1.5 or 1.7, if you have it at all]) ) )
55
56# Checks for libraries.
57AC_CHECK_LIB([dl], [main])
58AC_CHECK_LIB([newt], [newtInit])
59standardthread=0;
60
61case $build in
62    *freebsd*)
63        standardthread=0
64        AC_ARG_ENABLE(standard-pthreads, AS_HELP_STRING(--enable-standard-pthreads,(FreeBSD only) Compile with FreeBSD "standard" pthreads instead of LinuxThreads -- *MAY BE UNSTABLE*), standardthread=1, standardthread=0)
65        if test $standardthread -eq 0; then
66            CPPFLAGS=$CPPFLAGS -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include/pthread/linuxthreads
67            PTHREAD="-L/usr/local/lib -llthread -llgcc_r";
68            if ! test -f /usr/local/include/pthread/linuxthreads/pthread.h; then
69                echo "*** Cannot find pthread.h: are you SURE you have linuxthreads installed?"
70                exit 1
71            fi
72            AC_CHECK_LIB(lthread, pthread_create, true, [echo "*** Cannot find -llthread."; echo "*** Please install linuxthreads from /usr/ports/devel/linuxthreads."; exit 1], [-L/usr/local/lib -llgcc_r])
73        else
74            PTHREAD="-lc_r"
75        fi
76        ;;
77    *linux*)
78        AC_CHECK_LIB(pthread, pthread_create, true, [echo "*** Cannot find -lpthread."; echo "*** Please make sure you have the linuxthreads glibc add-on installed."; exit 1])
79        PTHREAD="-lpthread"
80        ;;
81    *)
82        echo "*** Sorry, only Linux and FreeBSD are supported at this time. Want to help?"
83        ;;
84esac
85
86if test "$host_cpu" != "$target_cpu"; then
87    host_cpu=$target_cpu
88fi
89case "$host_cpu" in
90    i?86*)
91    #x86_64*)
92        ARCH=i386
93        CPPFLAGS="$CPPFLAGS -D__IA32__"
94        ;;
95    ia64*)
96        ARCH=ia64
97        CPPFLAGS="$CPPFLAGS -D__IA64__"
98        ;;
99    *)
100        echo "*** Sorry, only Intel Architectures (ia32, ia64) are supported at this time. Want to help?"
101        ;;
102esac
103AC_SUBST(ARCH)
104
105LIBS="$LIBS $PTHREAD"
106AC_SUBST(LIBS)
107
108if test x$do_x = xyes ; then
109    XMONDO=xmondo
110    QT_LIBRARY=-lqt
111    AC_PATH_XTRA
112    dnl AC_PATH_KDE
113    dnl KDE_USE_QT(3)
114else
115    dnl Automake requires all conditionals to be done sometime; if they're not being
116    dnl done by the KDE checks, they're done here.
117    AM_CONDITIONAL(include_ARTS, false)
118    dnl AC_FIND_BZIP2
119    dnl KDE_CHECK_BINUTILS
120    XMONDO=
121    QT_LIBRARY=
122fi
123AC_SUBST(XMONDO)
124AC_SUBST(QT_LIBRARY)
125
126# Checks for header files.
127AC_HEADER_STDC
128AC_HEADER_SYS_WAIT
129AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h sys/ioctl.h sys/param.h sys/time.h unistd.h])
130
131# Checks for typedefs, structures, and compiler characteristics.
132AC_C_CONST
133AC_TYPE_OFF_T
134AC_TYPE_PID_T
135
136# Checks for library functions.
137AC_FUNC_CHOWN
138AC_FUNC_FORK
139AC_PROG_GCC_TRADITIONAL
140AC_FUNC_LSTAT
141AC_FUNC_MALLOC
142AC_TYPE_SIGNAL
143AC_FUNC_VPRINTF
144AC_CHECK_FUNCS([bzero getcwd memmove memset mkdir mkfifo setenv strcasecmp strchr strerror strrchr strstr])
145
146if test -n "$qt_includes"; then
147    my_qt_includes="-I$qt_includes"
148else
149    my_qt_includes=""
150fi
151AC_SUBST(my_qt_includes)
152
153if test -n "$qt_libraries"; then
154    my_qt_libraries="-L$qt_libraries"
155else
156    my_qt_libraries=""
157fi
158AC_SUBST(my_qt_libraries)
159
160if test -n "$kde_includes"; then
161    my_kde_includes="-I$kde_includes"
162else
163    my_kde_includes=""
164fi
165AC_SUBST(my_kde_includes)
166
167if test -n "$kde_libraries"; then
168    my_kde_libraries="-L$kde_libraries"
169else
170    my_kde_libraries=""
171fi
172AC_SUBST(my_kde_libraries)
173
174AC_OUTPUT([Makefile mondo/Makefile mondo/common/Makefile mondo/mondoarchive/Makefile mondo/mondorestore/Makefile mondo/docs/Makefile mondo/docs/en/Makefile mondo/docs/en/1.6x-howto/Makefile mondo/restore-scripts/Makefile mondo/restore-scripts/mondo/Makefile mondo/restore-scripts/usr/Makefile mondo/restore-scripts/usr/bin/Makefile mondo/xmondo/Makefile])
Note: See TracBrowser for help on using the repository browser.