source: MondoRescue/branches/stable/mondo/configure.in@ 415

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