source: branches/2.04_berlios/mondo/configure.in @ 2708

Last change on this file since 2708 was 2708, checked in by bruno, 9 years ago

r4184@localhost: bruno | 2011-01-27 15:52:51 +0100

  • Adds support for hpsa driver (new HP Smart Array driver)
  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1dnl Autoconfigure file for Mondo Rescue v2.0x_berlios
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 2708 2011-01-27 18:31:44Z bruno $
8dnl
9AC_INIT([Mondo Rescue],[2.04_berlios],[mondo-devel@lists.sourceforge.net])
10AC_CONFIG_SRCDIR([mondo/mondoarchive/main.c])
11AM_CONFIG_HEADER(config.h)
12
13AC_CANONICAL_HOST
14AC_CANONICAL_TARGET
15AC_ARG_PROGRAM
16
17AM_INIT_AUTOMAKE([mondo], [2.04_berlios])
18AM_MAINTAINER_MODE
19
20AM_PROG_LIBTOOL
21AC_PROG_CXX
22AC_PROG_AWK
23AC_PROG_CC
24AC_PROG_CPP
25AC_PROG_INSTALL
26AC_PROG_LN_S
27AC_PROG_MAKE_SET
28
29
30dnl --with/--enable stuff
31do_static_mr=
32AC_ARG_WITH(x11, AS_HELP_STRING(--with-x11,Create libXmondo and XMondo for X11/KDE support), do_x=$withval, do_x= )
33AC_ARG_ENABLE(static-mr, AS_HELP_STRING(--enable-static-mr,Link mondorestore statically), do_static_mr=$withval, do_static_mr= )
34AC_ARG_ENABLE(debug, AS_HELP_STRING(--enable-debug,Add debugging flags), CFLAGS="$CFLAGS -g", )
35AC_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)
36AC_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)
37if test x$do_static_mr = xyes; then
38    MONDORESTORE_STATIC=-static
39else
40    MONDORESTORE_STATIC=
41fi
42AC_SUBST(MONDORESTORE_STATIC)
43AC_DEFINE_UNQUOTED(MAX_NOOF_MEDIA, $max_noof_media, [Maximum number of media])
44AC_DEFINE_UNQUOTED(EXTTAPE, $exttape, [Tape blocksize])
45if test -n "$do_x"; then
46    AC_DEFINE(WITH_X, 1, [Define if compiled with X support])
47else
48    AC_DEFINE(WITH_X, 0, [Define if compiled with X support])
49fi
50AM_CONDITIONAL(XWIN, test x$do_x = xyes)
51
52# ( 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]) ) )
53
54# Checks for libraries.
55AC_CHECK_LIB([dl], [main])
56AC_CHECK_LIB([newt], [newtInit])
57standardthread=0;
58
59case $build in
60    *freebsd*)
61        standardthread=0
62        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)
63        if test $standardthread -eq 0; then
64            CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include/pthread/linuxthreads"
65            PTHREAD="-L/usr/local/lib -llthread -llgcc_r";
66            if ! test -f /usr/local/include/pthread/linuxthreads/pthread.h; then
67                echo "*** Cannot find pthread.h: are you SURE you have linuxthreads installed?"
68                exit 1
69            fi
70            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])
71        else
72            PTHREAD="-lc_r"
73        fi
74        ;;
75    *linux*)
76        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])
77        PTHREAD="-lpthread"
78        ;;
79    *)
80        echo "*** Sorry, only Linux and FreeBSD are supported at this time. Want to help?"
81        ;;
82esac
83
84if test "$host_cpu" != "$target_cpu"; then
85    host_cpu=$target_cpu
86fi
87case "$host_cpu" in
88    i?86*)
89    #x86_64*)
90        ARCH=i386
91        CPPFLAGS="$CPPFLAGS -D__IA32__"
92        ;;
93    ia64*)
94        ARCH=ia64
95        CPPFLAGS="$CPPFLAGS -D__IA64__"
96        ;;
97    *)
98        echo "*** Sorry, only Intel Architectures (ia32, ia64) are supported at this time. Want to help?"
99        ;;
100esac
101AC_SUBST(ARCH)
102
103LIBS="$LIBS $PTHREAD"
104AC_SUBST(LIBS)
105
106if test x$do_x = xyes ; then
107    XMONDO=xmondo
108    QT_LIBRARY=-lqt
109    AC_PATH_XTRA
110    dnl AC_PATH_KDE
111    dnl KDE_USE_QT(3)
112else
113    dnl Automake requires all conditionals to be done sometime; if they're not being
114    dnl done by the KDE checks, they're done here.
115    AM_CONDITIONAL(include_ARTS, false)
116    dnl AC_FIND_BZIP2
117    dnl KDE_CHECK_BINUTILS
118    XMONDO=
119    QT_LIBRARY=
120fi
121AC_SUBST(XMONDO)
122AC_SUBST(QT_LIBRARY)
123
124# Checks for header files.
125AC_HEADER_STDC
126AC_HEADER_SYS_WAIT
127AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h sys/ioctl.h sys/param.h sys/time.h unistd.h])
128
129# Checks for typedefs, structures, and compiler characteristics.
130AC_C_CONST
131AC_TYPE_OFF_T
132AC_TYPE_PID_T
133
134# Checks for library functions.
135AC_FUNC_CHOWN
136AC_FUNC_FORK
137AC_PROG_GCC_TRADITIONAL
138AC_FUNC_LSTAT
139AC_FUNC_MALLOC
140AC_TYPE_SIGNAL
141AC_FUNC_VPRINTF
142AC_CHECK_FUNCS([bzero getcwd memmove memset mkdir mkfifo setenv strcasecmp strchr strerror strrchr strstr])
143
144if test -n "$qt_includes"; then
145    my_qt_includes="-I$qt_includes"
146else
147    my_qt_includes=""
148fi
149AC_SUBST(my_qt_includes)
150
151if test -n "$qt_libraries"; then
152    my_qt_libraries="-L$qt_libraries"
153else
154    my_qt_libraries=""
155fi
156AC_SUBST(my_qt_libraries)
157
158if test -n "$kde_includes"; then
159    my_kde_includes="-I$kde_includes"
160else
161    my_kde_includes=""
162fi
163AC_SUBST(my_kde_includes)
164
165if test -n "$kde_libraries"; then
166    my_kde_libraries="-L$kde_libraries"
167else
168    my_kde_libraries=""
169fi
170AC_SUBST(my_kde_libraries)
171
172AC_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.