source: branches/2.2.10/mondo/configure.in @ 2603

Last change on this file since 2603 was 2603, checked in by Bruno Cornec, 10 years ago

r3757@localhost: bruno | 2010-03-17 15:05:13 +0100

  • Adds a new interface param between mondoarchive and mindi for backup-media-type which was missing
  • Improve again logging
  • Try to improve keymap support
  • Remove some remaining hard coded /proc/cmdline
  • Adds a cache for the find command for modules launched twice to make it quicker on my Atom netboot in a QEMU VM
  • Remove dependency at build time on mindi to only use MINDI_CONF env var
  • Property svn:keywords set to Id Rev
File size: 4.8 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 2603 2010-03-22 12:56:30Z 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])
14AC_CONFIG_MACRO_DIR([m4])
15AM_CONFIG_HEADER(config.h)
16
17AC_CANONICAL_HOST
18AC_CANONICAL_TARGET
19AC_ARG_PROGRAM
20
21AM_INIT_AUTOMAKE([mondo], MONDO_VER)
22AM_MAINTAINER_MODE
23
24LT_INIT
25
26AC_PROG_CXX
27AC_PROG_AWK
28AC_PROG_CC
29#AC_PROG_RANLIB
30AC_PROG_LIBTOOL
31AC_PROG_CPP
32AC_PROG_INSTALL
33AC_PROG_LN_S
34AC_PROG_MAKE_SET
35
36
37dnl --with/--enable stuff
38do_static_mr=
39AC_ARG_ENABLE(static-mr, AS_HELP_STRING(--enable-static-mr,Link mondorestore statically), do_static_mr=$withval, do_static_mr= )
40AC_ARG_ENABLE(debug, AS_HELP_STRING(--enable-debug,Add debugging flags), CFLAGS="$CFLAGS -g", )
41AC_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)
42AC_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)
43if test x$do_static_mr = xyes; then
44    MONDORESTORE_STATIC=-static
45else
46    MONDORESTORE_STATIC=
47fi
48AC_SUBST(MONDORESTORE_STATIC)
49AC_DEFINE_UNQUOTED(MAX_NOOF_MEDIA, $max_noof_media, [Maximum number of media])
50AC_DEFINE_UNQUOTED(EXTTAPE, $exttape, [Tape blocksize])
51
52# We need to know where is mindi conf dir in order to add content to it
53if [ "_$MINDI_CONF" != "_" ]; then
54    export MINDI_CONF
55else
56    export MINDI_CONF=/usr/local/etc/mindi
57fi
58
59
60# ( 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]) ) )
61
62# Checks for libraries.
63dnl AC_CHECK_LIB([dl], [main])
64AC_CHECK_LIB([newt], [newtInit])
65standardthread=0;
66
67case $build in
68    *freebsd*)
69        standardthread=0
70        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)
71        if test $standardthread -eq 0; then
72            CPPFLAGS=$CPPFLAGS -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include/pthread/linuxthreads
73            PTHREAD="-L/usr/local/lib -llthread -llgcc_r";
74            if ! test -f /usr/local/include/pthread/linuxthreads/pthread.h; then
75                echo "*** Cannot find pthread.h: are you SURE you have linuxthreads installed?"
76                exit 1
77            fi
78            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])
79        else
80            PTHREAD="-lc_r"
81        fi
82        ;;
83    *linux*)
84        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])
85        PTHREAD="-lpthread"
86        GCC_MAJ="`gcc -dumpversion 2>&1 | cut -d. -f1`"
87        GCC_MIN="`gcc -dumpversion 2>&1 | cut -d. -f2`"
88        CFLAGS="$CFLAGS -Wall -Wno-return-type -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT"
89        if test "$GCC_MAJ" -ge "4" && test "$GCC_MIN" -ge "2"; then
90            CFLAGS="$CFLAGS -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector"
91        fi
92        ;;
93    *)
94        echo "*** Sorry, only Linux and FreeBSD are supported at this time. Want to help?"
95        ;;
96esac
97
98if test "$host_cpu" != "$target_cpu"; then
99    host_cpu=$target_cpu
100fi
101case "$host_cpu" in
102    i?86*)
103        CPPFLAGS="$CPPFLAGS -D__IA32__"
104        ;;
105    x86_64*)
106        CPPFLAGS="$CPPFLAGS -D__IA32__ -D__X86_64__"
107        ;;
108    ia64*)
109        CPPFLAGS="$CPPFLAGS -D__IA64__"
110        ;;
111    *)
112        echo "*** Sorry, only Intel Architectures (ia32, x86_64, ia64) are supported at this time. Want to help?"
113        ;;
114esac
115
116LIBS="$LIBS $PTHREAD"
117AC_SUBST(LIBS)
118
119# Checks for header files.
120AC_HEADER_STDC
121AC_HEADER_SYS_WAIT
122AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h sys/ioctl.h sys/param.h sys/time.h unistd.h])
123
124# Checks for typedefs, structures, and compiler characteristics.
125AC_C_CONST
126AC_TYPE_OFF_T
127AC_TYPE_PID_T
128
129# Checks for library functions.
130AC_FUNC_CHOWN
131AC_FUNC_FORK
132AC_PROG_GCC_TRADITIONAL
133AC_FUNC_LSTAT
134AC_FUNC_MALLOC
135AC_TYPE_SIGNAL
136AC_FUNC_VPRINTF
137AC_CHECK_FUNCS([bzero getcwd memmove memset mkdir mkfifo getopt setenv strcasecmp strchr strerror strrchr strstr mkdtemp])
138
139AC_OUTPUT([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 deplist.d/Makefile])
Note: See TracBrowser for help on using the repository browser.