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

Last change on this file since 2899 was 1663, checked in by Bruno Cornec, 17 years ago
  • Fix bug #197 (based on an initial patch of Scott Cummings)
  • Fix a bug where df was using locale to print messages and wasn't filtered correctly
  • mkdtemp checked in configure
  • reset_bkpinfo called as early as possible by both main program.
  • It creates a tmpdir cleanly with mkdtemp in setup_tmpdir subfunction, which takes in account TMPIR and TMP env var. Remains to see what tmpfs does and tests
  • configure.in should also be filtered.
  • Remove g_bkpinfo_DONTUSETHIS
  • remove bkpinfo also from header files
  • Render bkpinfo global (potential issue on thread, but should not be a problem as that structure is indeed static during archive)
  • Apply patch from Andree Leidenfrost, modified a bit to use bkpinfo->tmpdir instead of /tmp or MINDI_CACHE when appropriate. Fix security issues in mondo. Thanks al ot Andree for catching all those issues.
  • /tmp => /var/log for mondorestore.log in mindi
  • Update linux terminfo to fix a color issue (Andree Leidenfrost)
  • Removes useless log file (Andree Leidenfrost)
  • replace vi with find_my_editor during restore (Andree Leidenfrost)
  • sync in bg in mindi (VMWare issue to look at)
  • mindi/mindi-busybox have a different version than mondo for pb
  • PB-SUF also added to spec file
  • Fix a bug for pb build (omission of PB-SUF declaration)

(merge -r1631:1662 $SVN_M/branches/2.2.5)

  • Property svn:keywords set to Id Rev
File size: 4.3 KB
Line 
1dnl Autoconfigure file for Mondo Rescue v2.0x
2dnl Mondo by Mondo dev team
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 1663 2007-09-27 10:21:18Z bruno $
8dnl
9define(MONDO_VER,m4_normalize(PBVER))
10define(MONDO_REV,m4_normalize(rPBREV))
11define(MONDO_TAG,MONDO_VER-MONDO_REV)
12AC_INIT([Mondo Rescue],MONDO_TAG,[mondo-devel@lists.sourceforge.net])
13AC_CONFIG_SRCDIR([src/mondoarchive/mondoarchive.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
23AC_PROG_CXX
24AC_PROG_AWK
25AC_PROG_CC
26AC_PROG_RANLIB
27AC_PROG_CPP
28AC_PROG_INSTALL
29AC_PROG_LN_S
30AC_PROG_MAKE_SET
31
32AM_GNU_GETTEXT([external])
33ALL_LINGUAS="fr"
34
35dnl --with/--enable stuff
36do_static_mr=
37AC_ARG_ENABLE(static-mr, AS_HELP_STRING(--enable-static-mr,Link mondorestore statically), do_static_mr=$withval, do_static_mr= )
38AC_ARG_ENABLE(debug, AS_HELP_STRING(--enable-debug,Add debugging flags), CFLAGS="$CFLAGS -g", )
39AC_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)
40if test x$do_static_mr = xyes; then
41 MONDORESTORE_STATIC=-static
42else
43 MONDORESTORE_STATIC=
44fi
45AC_SUBST(MONDORESTORE_STATIC)
46
47# ( 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]) ) )
48
49# Checks for libraries.
50dnl AC_CHECK_LIB([dl], [main])
51AC_CHECK_LIB([newt], [newtInit])
52standardthread=0;
53
54case $build in
55 *freebsd*)
56 standardthread=0
57 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)
58 if test $standardthread -eq 0; then
59 CPPFLAGS=$CPPFLAGS -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include/pthread/linuxthreads
60 PTHREAD="-L/usr/local/lib -llthread -llgcc_r";
61 if ! test -f /usr/local/include/pthread/linuxthreads/pthread.h; then
62 echo "*** Cannot find pthread.h: are you SURE you have linuxthreads installed?"
63 exit 1
64 fi
65 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])
66 else
67 PTHREAD="-lc_r"
68 fi
69 ;;
70 *linux*)
71 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])
72 PTHREAD="-lpthread"
73 CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -Wshadow -funsigned-char -Wstrict-prototypes -Wunused -Winit-self -Wcast-align -fno-strict-aliasing"
74 ;;
75 *)
76 echo "*** Sorry, only Linux and FreeBSD are supported at this time. Want to help?"
77 ;;
78esac
79
80if test "$host_cpu" != "$target_cpu"; then
81 host_cpu=$target_cpu
82fi
83case "$host_cpu" in
84 i?86*)
85 CPPFLAGS="$CPPFLAGS -D__IA32__ -Wall"
86 ;;
87 x86_64*)
88 CPPFLAGS="$CPPFLAGS -D__IA32__ -D__X86_64__ -Wall"
89 ;;
90 ia64*)
91 CPPFLAGS="$CPPFLAGS -D__IA64__ -Wall"
92 ;;
93 *)
94 echo "*** Sorry, only Intel Architectures (ia32, x86_64, ia64) are supported at this time. Want to help?"
95 ;;
96esac
97
98LIBS="$LIBS $PTHREAD"
99AC_SUBST(LIBS)
100
101# Checks for header files.
102AC_HEADER_STDC
103AC_HEADER_SYS_WAIT
104AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h sys/ioctl.h sys/param.h sys/time.h unistd.h])
105
106# Checks for typedefs, structures, and compiler characteristics.
107AC_C_CONST
108AC_TYPE_OFF_T
109AC_TYPE_PID_T
110
111# Checks for library functions.
112AC_FUNC_CHOWN
113AC_FUNC_FORK
114AC_PROG_GCC_TRADITIONAL
115AC_FUNC_LSTAT
116AC_FUNC_MALLOC
117AC_TYPE_SIGNAL
118AC_FUNC_VPRINTF
119AC_CHECK_FUNCS([bzero getcwd memmove memset mkdir mkfifo setenv strcasecmp strchr strerror strrchr strstr mkdtemp strspn getline asprintf trunc vasprintf])
120
121AC_OUTPUT([Makefile src/Makefile src/common/Makefile src/lib/Makefile src/mondoarchive/Makefile src/mondorestore/Makefile src/restore-scripts/Makefile src/restore-scripts/mondo/Makefile src/restore-scripts/usr/Makefile src/restore-scripts/usr/bin/Makefile src/post-nuke.sample/Makefile src/post-nuke.sample/usr/Makefile src/post-nuke.sample/usr/bin/Makefile distributions/Makefile distributions/conf/Makefile])
Note: See TracBrowser for help on using the repository browser.