X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=configure;h=c7853d1c95d5d056846201c10fd66c84f83ac3d9;hb=e97319e259ab48257bdde1ba4e4bbfab9548579f;hp=def5f4e8a418d7e3fec6d4f737c8ecfd6bf98974;hpb=9e8fcd6e01c298ead62aafc7f7ba342a59c9b0e8;p=tools%2Fe2fsprogs.git diff --git a/configure b/configure index def5f4e..c7853d1 100755 --- a/configure +++ b/configure @@ -625,14 +625,15 @@ gl_use_threads_default= ac_func_list= ac_subst_vars='LTLIBOBJS LIBOBJS +LDFLAGS_SHLIB +CFLAGS_STLIB +CFLAGS_SHLIB BUILD_LDFLAGS BUILD_CFLAGS MKINSTALLDIRS INCLUDES DO_TEST_SUITE -ET_DIR -SS_DIR -LDFLAG_STATIC +LDFLAGS_STATIC root_sysconfdir root_libdir root_sbindir @@ -645,13 +646,16 @@ UNI_DIFF_OPTS SEM_INIT_LIB FUSE_CMT FUSE_LIB +CLOCK_GETTIME_LIB MAGIC_LIB SOCKET_LIB +SIZEOF_TIME_T SIZEOF_OFF_T SIZEOF_LONG_LONG SIZEOF_LONG SIZEOF_INT SIZEOF_SHORT +DD BUILD_CC MAKEINFO STRIP @@ -727,6 +731,8 @@ SET_MAKE VERSION PACKAGE GETTEXT_PACKAGE +TDB_MAN_COMMENT +TDB_CMT UUIDD_CMT E2INITRD_MAN E2INITRD_PROG @@ -813,6 +819,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -856,6 +863,7 @@ enable_elf_shlibs enable_bsd_shlibs enable_profile enable_gcov +enable_hardening enable_jbd_debug enable_blkid_debug enable_testio_debug @@ -871,6 +879,7 @@ enable_e2initrd_helper enable_tls enable_uuidd enable_mmp +enable_tdb enable_bmap_stats enable_bmap_stats_ops enable_nls @@ -934,6 +943,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1186,6 +1196,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1323,7 +1342,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1476,6 +1495,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1517,6 +1537,7 @@ Optional Features: --enable-bsd-shlibs select BSD shared libraries --enable-profile build profiling libraries --enable-gcov build for coverage testing using gcov + --enable-hardening build for coverage testing using gcov --enable-jbd-debug enable journal debugging --enable-blkid-debug enable blkid debugging --disable-testio-debug disable the use of the test I/O manager for debugging @@ -1532,6 +1553,7 @@ Optional Features: --disable-tls disable use of thread local support --disable-uuidd disable building the uuid daemon --disable-mmp disable support mmp, Multi Mount Protection + --disable-tdb disable tdb support --disable-bmap-stats disable collection of bitmap stats. --enable-bmap-stats-ops enable collection of additional bitmap stats --disable-nls do not use Native Language Support @@ -2738,7 +2760,7 @@ E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \ | awk '{print $3}' | tr \" " " | awk '{print $1}'` DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \ | tr \" " "` -E2FSPROGS_DAY=`echo $DATE | awk -F- '{print $1}'` +E2FSPROGS_DAY=$(echo $DATE | awk -F- '{print $1}' | sed -e '/^[1-9]$/s/^/0/') MONTH=`echo $DATE | awk -F- '{print $2}'` YEAR=`echo $DATE | awk -F- '{print $3}'` @@ -2774,7 +2796,7 @@ date_spec=${E2FSPROGS_YEAR}.${MONTH_NUM}.${E2FSPROGS_DAY} case $E2FSPROGS_VERSION in *-WIP|pre-*) - E2FSPROGS_PKGVER="$base_ver~WIP-$E2FSPROGS_YEAR-$MONTH_NUM-$E2FSPROGS_DAY" + E2FSPROGS_PKGVER="$base_ver~WIP.$date_spec" ;; *) E2FSPROGS_PKGVER="$base_ver" @@ -3706,9 +3728,6 @@ fi $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : DLOPEN_LIB=-ldl - -$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h - fi @@ -5000,6 +5019,27 @@ fi fi +CFLAGS_SHLIB="${CFLAGS_SHLIB:-$CFLAGS}" +CFLAGS_STLIB="${CFLAGS_STLIB:-$CFLAGS}" +LDFLAGS_SHLIB=${LDFLAGS_SHLIB:-$LDFLAGS} +LDFLAGS_STATIC=${LDFLAGS_STATIC:-$LDFLAGS} +# Check whether --enable-hardening was given. +if test "${enable_hardening+set}" = set; then : + enableval=$enable_hardening; if test "$enableval" = "yes" +then + HARDEN_CFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong" + HARDEN_LDFLAGS="-Wl,-z,relro -Wl,-z,now" + CFLAGS="$CFLAGS $HARDEN_CFLAGS -fPIE" + CFLAGS_SHLIB="$CFLAGS_SHLIB $HARDEN_CFLAGS" + CFLAGS_STLIB="$CFLAGS_STLIB $HARDEN_CFLAGS -fPIE" + LDFLAGS="$LDFLAGS $HARDEN_LDFLAGS -fPIE -pie" + LDFLAGS_STATIC="$LDFLAGS_STATIC $HARDEN_LDFLAGS" + LDFLAGS_SHLIB="$LDFLAGS_SHLIB $HARDEN_LDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling hardening support" >&5 +$as_echo "Enabling hardening support" >&6; } +fi + +fi @@ -5901,6 +5941,36 @@ $as_echo "#define CONFIG_MMP 1" >>confdefs.h fi +# Check whether --enable-tdb was given. +if test "${enable_tdb+set}" = set; then : + enableval=$enable_tdb; if test "$enableval" = "no" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling tdb support" >&5 +$as_echo "Disabling tdb support" >&6; } + TDB_CMT="#" + TDB_MAN_COMMENT='.\"' +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling tdb support" >&5 +$as_echo "Enabling tdb support" >&6; } + $as_echo "#define CONFIG_TDB 1" >>confdefs.h + + TDB_CMT="" + TDB_MAN_COMMENT="" +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling mmp support by default" >&5 +$as_echo "Enabling mmp support by default" >&6; } +$as_echo "#define CONFIG_TDB 1" >>confdefs.h + +TDB_CMT="" +TDB_MAN_COMMENT="" + +fi + + + + # Check whether --enable-bmap-stats was given. if test "${enable_bmap_stats+set}" = set; then : enableval=$enable_bmap_stats; if test "$enableval" = "no" @@ -7166,6 +7236,8 @@ main () if (*(data + i) != *(data3 + i)) return 14; close (fd); + free (data); + free (data3); return 0; } _ACEOF @@ -11446,7 +11518,12 @@ if ${_cv_gnu_make_command+:} false; then : $as_echo_n "(cached) " >&6 else _cv_gnu_make_command='' ; - for a in "$MAKE" make gmake gnumake ; do + if test -n "$FORCE_NATIVE_MAKE" ; then + MAKES="make" + else + MAKES="make gmake gnumake" + fi + for a in "$MAKE" $MAKES ; do if test -z "$a" ; then continue ; fi ; if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then _cv_gnu_make_command=$a ; @@ -12231,7 +12308,7 @@ fi if test "_$MAKEINFO" = "_"; then - MAKEINFO="@echo Makeinfo is missing. Info documentation will not be built.;true" + MAKEINFO="echo Makeinfo is missing. Info documentation will not be built." else case "$MAKEINFO" in */missing.*) @@ -12294,7 +12371,7 @@ fi done fi -for ac_header in dirent.h errno.h execinfo.h getopt.h malloc.h mntent.h paths.h semaphore.h setjmp.h signal.h stdarg.h stdint.h stdlib.h termios.h termio.h unistd.h utime.h attr/xattr.h linux/falloc.h linux/fd.h linux/major.h linux/loop.h net/if_dl.h netinet/in.h sys/acl.h sys/disklabel.h sys/disk.h sys/file.h sys/ioctl.h sys/key.h sys/mkdev.h sys/mman.h sys/mount.h sys/prctl.h sys/resource.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/syscall.h sys/sysctl.h sys/sysmacros.h sys/time.h sys/types.h sys/un.h sys/wait.h +for ac_header in dirent.h errno.h execinfo.h getopt.h malloc.h mntent.h paths.h semaphore.h setjmp.h signal.h stdarg.h stdint.h stdlib.h termios.h termio.h unistd.h utime.h attr/xattr.h linux/falloc.h linux/fd.h linux/fsmap.h linux/major.h linux/loop.h linux/types.h net/if_dl.h netinet/in.h sys/acl.h sys/disklabel.h sys/disk.h sys/file.h sys/ioctl.h sys/key.h sys/mkdev.h sys/mman.h sys/mount.h sys/prctl.h sys/resource.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/syscall.h sys/sysctl.h sys/sysmacros.h sys/time.h sys/types.h sys/un.h sys/wait.h sys/xattr.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12307,6 +12384,27 @@ fi done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a dd(1) program that supports iflag=fullblock" >&5 +$as_echo_n "checking for a dd(1) program that supports iflag=fullblock... " >&6; } +DD= +for i in dd gdd ; do + if "$i" if=/dev/null of=/dev/null count=1 bs=10k 2>/dev/null iflag=fullblock oflag=append ; then + DD=$i + break + fi +done +if test -n "$DD" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DD" >&5 +$as_echo "$DD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, using dd" >&5 +$as_echo "not found, using dd" >&6; } + DD=dd + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No GNU-compatible dd(1) program found, expect some self-test failures." >&5 +$as_echo "$as_me: WARNING: No GNU-compatible dd(1) program found, expect some self-test failures." >&2;} +fi + + for ac_header in net/if.h do : ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " @@ -12555,11 +12653,46 @@ cat >>confdefs.h <<_ACEOF _ACEOF +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 +$as_echo_n "checking size of time_t... " >&6; } +if ${ac_cv_sizeof_time_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (time_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_time_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_TIME_T $ac_cv_sizeof_time_t +_ACEOF + + SIZEOF_SHORT=$ac_cv_sizeof_short SIZEOF_INT=$ac_cv_sizeof_int SIZEOF_LONG=$ac_cv_sizeof_long SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long SIZEOF_OFF_T=$ac_cv_sizeof_off_t +SIZEOF_TIME_T=$ac_cv_sizeof_time_t + @@ -12961,7 +13094,10 @@ if test "$ac_res" != no; then : fi fi -for ac_func in __secure_getenv add_key backtrace blkid_probe_get_topology blkid_probe_enable_partitions chflags fadvise64 fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 futimes getcwd getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 keyctl llistxattr llseek lseek64 mallinfo mbstowcs memalign mempcpy mmap msync nanosleep open64 pathconf posix_fadvise posix_fadvise64 posix_memalign prctl pread pwrite pread64 pwrite64 secure_getenv setmntent setresgid setresuid snprintf srandom stpcpy strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime utimes valloc +if test -n "$DLOPEN_LIB" ; then + ac_cv_func_dlopen=yes +fi +for ac_func in __secure_getenv add_key backtrace blkid_probe_get_topology blkid_probe_enable_partitions chflags dlopen fadvise64 fallocate fallocate64 fchown fcntl fdatasync fstat64 fsync ftruncate64 futimes getcwd getdtablesize gethostname getmntinfo getpwuid_r getrlimit getrusage jrand48 keyctl llistxattr llseek lseek64 mallinfo mbstowcs memalign mempcpy mmap msync nanosleep open64 pathconf posix_fadvise posix_fadvise64 posix_memalign prctl pread pwrite pread64 pwrite64 secure_getenv setmntent setresgid setresuid snprintf srandom stpcpy strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime utimes valloc do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -13067,10 +13203,51 @@ done fi -if test "$ac_cv_lib_dl_dlopen" = yes ; then +if test "$ac_cv_func_dlopen" = yes ; then MAGIC_LIB=$DLOPEN_LIB fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_clock_gettime=yes +else + ac_cv_lib_rt_clock_gettime=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : + CLOCK_GETTIME_LIB=-lrt +fi + + FUSE_CMT= FUSE_LIB= # Check whether --enable-fuse2fs was given. @@ -13366,7 +13543,10 @@ $as_echo "#define HAVE_OPTRESET 1" >>confdefs.h fi SEM_INIT_LIB='' -ac_fn_c_check_func "$LINENO" "sem_init" "ac_cv_func_sem_init" +echo GL_THREADS_API: ${gl_threads_api} +if test "${gl_threads_api}" != none +then + ac_fn_c_check_func "$LINENO" "sem_init" "ac_cv_func_sem_init" if test "x$ac_cv_func_sem_init" = xyes; then : else @@ -13499,6 +13679,7 @@ fi fi fi +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unified diff option" >&5 $as_echo_n "checking for unified diff option... " >&6; } @@ -13613,7 +13794,7 @@ $as_echo_n "checking whether we can link with -static... " >&6; } if ${ac_cv_e2fsprogs_use_static+:} false; then : $as_echo_n "(cached) " >&6 else - SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static" + SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS_STATIC -static" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -13642,9 +13823,8 @@ solaris2.*) esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_e2fsprogs_use_static" >&5 $as_echo "$ac_cv_e2fsprogs_use_static" >&6; } -LDFLAG_STATIC= if test $ac_cv_e2fsprogs_use_static = yes; then - LDFLAG_STATIC=-static + LDFLAGS_STATIC="$LDFLAGS_STATIC -static" fi case "$host_os" in @@ -13656,10 +13836,6 @@ $as_echo "#define _INTL_REDIRECT_MACROS 1" >>confdefs.h ;; esac -SS_DIR=`cd ${srcdir}/lib/ss; pwd` -ET_DIR=`cd ${srcdir}/lib/et; pwd` - - if test "$cross_compiling" = yes ; then DO_TEST_SUITE= else @@ -13696,6 +13872,12 @@ if test $cross_compiling = no; then fi +CFLAGS_SHLIB=${CFLAGS_SHLIB:-$CFLAGS} +CFLAGS_STLIB=${CFLAGS_STLIB:-$CFLAGS} +LDFLAGS_SHLIB=${LDFLAGS_SHLIB:-$LDFLAGS} + + + test -d lib || mkdir lib test -d include || mkdir include test -d include/linux || mkdir include/linux @@ -13712,7 +13894,7 @@ for i in MCONFIG Makefile e2fsprogs.spec \ util/Makefile util/subst.conf util/gen-tarball util/install-symlink \ lib/et/Makefile lib/ss/Makefile lib/e2p/Makefile \ lib/ext2fs/Makefile lib/ext2fs/ext2_types.h \ - $uuid_out_list $blkid_out_list lib/quota/Makefile \ + $uuid_out_list $blkid_out_list lib/support/Makefile \ lib/ss/ss.pc lib/et/com_err.pc lib/e2p/e2p.pc lib/ext2fs/ext2fs.pc \ misc/Makefile ext2ed/Makefile e2fsck/Makefile \ debugfs/Makefile tests/Makefile tests/progs/Makefile \