source: MondoRescue/branches/3.0/mondo/configure.in@ 3154

Last change on this file since 3154 was 3154, checked in by Bruno Cornec, 11 years ago
  • Remove the introduction of LogProgress in ListKernelModulePaths which should stay quiet
  • Remove a remaining support of max-noof-media in confidure.in now gone.
  • Fix #640 by cleaning up fully the managemnt of tmpdir and scratchdir (one function for the creation, one point of removal at end, intermediate removal if needed, clean naming conventions, unify mkdtemp usage, remove sensibly_set_tmpdir_and_scratchdir function). Consequence is that default dir for scratchdir if nothing else specified is /tmp using CLI and the largest partition using the GUI.
  • Fix a bug introduced in process_the_s_switch with intermediate variables which weren't initialized correctly.
  • Property svn:keywords set to Id Rev
File size: 4.5 KB
RevLine 
[179]1dnl Autoconfigure file for Mondo Rescue v2.0x
[553]2dnl Mondo by Mondo dev team
[1]3dnl This script by Joshua Oreman
4dnl
5dnl Process this file with autoconf >=2.53 to produce a configure script.
6dnl
[102]7dnl $Id: configure.in 3154 2013-06-22 22:34:33Z bruno $
[1]8dnl
[1618]9define(MONDO_VER,m4_normalize(PBVER)))
[1636]10define(MONDO_REV,m4_normalize(rPBREV)))
[215]11define(MONDO_TAG,MONDO_VER-MONDO_REV)
[3031]12AC_INIT([Mondo Rescue],[MONDO_TAG],[mondo-devel@lists.sourceforge.net])
[3058]13AC_CONFIG_SRCDIR([src/mondoarchive/mondoarchive.c])
[2239]14AC_CONFIG_MACRO_DIR([m4])
[3031]15AC_CONFIG_HEADERS([config.h])
[1]16
[3031]17AC_PREREQ([2.68])
[1]18AC_CANONICAL_HOST
19AC_CANONICAL_TARGET
20AC_ARG_PROGRAM
21
[3032]22AM_INIT_AUTOMAKE([mondo], MONDO_VER)
[2239]23LT_INIT
24
[1]25AC_PROG_CXX
26AC_PROG_AWK
27AC_PROG_CC
[3058]28AC_PROG_LIBTOOL
[1]29AC_PROG_CPP
30AC_PROG_INSTALL
31AC_PROG_LN_S
32AC_PROG_MAKE_SET
33
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(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(EXTTAPE, $exttape, [Tape blocksize])
47
48# ( 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]) ) )
49
50# Checks for libraries.
[423]51dnl AC_CHECK_LIB([dl], [main])
[1]52AC_CHECK_LIB([newt], [newtInit])
53standardthread=0;
54
55case $build in
56 *freebsd*)
57 standardthread=0
58 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)
59 if test $standardthread -eq 0; then
[182]60 CPPFLAGS=$CPPFLAGS -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include/pthread/linuxthreads
[1]61 PTHREAD="-L/usr/local/lib -llthread -llgcc_r";
62 if ! test -f /usr/local/include/pthread/linuxthreads/pthread.h; then
63 echo "*** Cannot find pthread.h: are you SURE you have linuxthreads installed?"
64 exit 1
65 fi
66 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])
67 else
68 PTHREAD="-lc_r"
69 fi
70 ;;
71 *linux*)
72 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])
73 PTHREAD="-lpthread"
[2195]74 GCC_MAJ="`gcc -dumpversion 2>&1 | cut -d. -f1`"
75 GCC_MIN="`gcc -dumpversion 2>&1 | cut -d. -f2`"
76 CFLAGS="$CFLAGS -Wall -Wno-return-type -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT"
77 if test "$GCC_MAJ" -ge "4" && test "$GCC_MIN" -ge "2"; then
78 CFLAGS="$CFLAGS -Werror=format-security"
79 fi
[1]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 CPPFLAGS="$CPPFLAGS -D__IA32__"
92 ;;
[1375]93 x86_64*)
94 CPPFLAGS="$CPPFLAGS -D__IA32__ -D__X86_64__"
95 ;;
[1]96 ia64*)
97 CPPFLAGS="$CPPFLAGS -D__IA64__"
98 ;;
99 *)
[1375]100 echo "*** Sorry, only Intel Architectures (ia32, x86_64, ia64) are supported at this time. Want to help?"
[1]101 ;;
102esac
103
104LIBS="$LIBS $PTHREAD"
105AC_SUBST(LIBS)
106
107# Checks for header files.
108AC_HEADER_STDC
109AC_HEADER_SYS_WAIT
[3030]110AC_HEADER_STDBOOL
111AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h locale.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h utime.h])
[1]112
113# Checks for typedefs, structures, and compiler characteristics.
114AC_C_CONST
[3030]115AC_C_INLINE
116AC_PROG_GCC_TRADITIONAL
117AC_TYPE_MODE_T
[1]118AC_TYPE_OFF_T
119AC_TYPE_PID_T
[3030]120AC_TYPE_SIZE_T
121AC_TYPE_SSIZE_T
[3138]122AC_STRUCT_ST_BLOCKS
[1]123
124# Checks for library functions.
125AC_FUNC_CHOWN
126AC_FUNC_FORK
[3030]127AC_FUNC_FSEEKO
[1]128AC_FUNC_LSTAT
129AC_FUNC_MALLOC
130AC_FUNC_VPRINTF
[3030]131AC_CHECK_FUNCS([bzero getcwd gethostbyname inet_ntoa memmove memset mkdir mkdtemp mkfifo setenv strcasecmp strcspn strchr strdup strerror strncasecmp strrchr strspn strstr uname utime])
[1]132
[3031]133AC_CONFIG_FILES([Makefile src/Makefile src/lib/Makefile src/common/Makefile src/mondoarchive/Makefile src/mondorestore/Makefile src/restore-scripts/Makefile src/restore-scripts/mondo/Makefile src/post-nuke.sample/Makefile src/post-nuke.sample/usr/Makefile src/post-nuke.sample/usr/bin/Makefile test/Makefile])
134AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.