X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=configure.ac;h=cb528da6852c8fb4a59f1994b8ec2488fd0fc966;hb=42c11edd0863e093a2cb84c56720af0e9b8e8c68;hp=4c4b552359c9154ad884d0b434a894030d795e48;hpb=8c9e2921ecb4f259cd86231c1e5008f72ca6b18a;p=tools%2Fe2fsprogs.git diff --git a/configure.ac b/configure.ac index 4c4b552..cb528da 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,10 @@ -AC_INIT(version.h) -AC_PREREQ(2.69) +AC_INIT +AC_CONFIG_SRCDIR([version.h]) +AC_PREREQ([2.71]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADERS([lib/config.h]) AH_BOTTOM([#include ]) +AC_USE_SYSTEM_EXTENSIONS MCONFIG=./MCONFIG AC_SUBST_FILE(MCONFIG) BINARY_TYPE=bin @@ -123,7 +125,6 @@ then else AC_MSG_RESULT([[(none)]]) fi -AC_USE_SYSTEM_EXTENSIONS dnl dnl Set default values for library extensions. Will be dealt with after dnl parsing configuration options, which may modify these @@ -1005,6 +1006,7 @@ AC_CHECK_HEADERS(m4_flatten([ sys/mman.h sys/mount.h sys/prctl.h + sys/random.h sys/resource.h sys/select.h sys/socket.h @@ -1137,18 +1139,12 @@ dnl flags somewhat portably. Also check for the analogous setter, chflags(). dnl AC_MSG_CHECKING(whether struct stat has a st_flags field) AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags, - AC_TRY_COMPILE([#include ], - [struct stat stat; stat.st_flags = 0;], - [e2fsprogs_cv_struct_st_flags=yes], - [e2fsprogs_cv_struct_st_flags=no])) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct stat stat; stat.st_flags = 0;]])],[e2fsprogs_cv_struct_st_flags=yes],[e2fsprogs_cv_struct_st_flags=no])) AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags) if test "$e2fsprogs_cv_struct_st_flags" = yes; then AC_MSG_CHECKING(whether st_flags field is useful) AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags_immut, - AC_TRY_COMPILE([#include ], - [struct stat stat; stat.st_flags |= UF_IMMUTABLE;], - [e2fsprogs_cv_struct_st_flags_immut=yes], - [e2fsprogs_cv_struct_st_flags_immut=no])) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct stat stat; stat.st_flags |= UF_IMMUTABLE;]])],[e2fsprogs_cv_struct_st_flags_immut=yes],[e2fsprogs_cv_struct_st_flags_immut=no])) AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags_immut) if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then AC_DEFINE(HAVE_STAT_FLAGS, 1, @@ -1200,9 +1196,11 @@ AC_CHECK_FUNCS(m4_flatten([ futimes getcwd getdtablesize + getentropy gethostname getmntinfo getpwuid_r + getrandom getrlimit getrusage jrand48 @@ -1211,6 +1209,7 @@ AC_CHECK_FUNCS(m4_flatten([ llseek lseek64 mallinfo + mallinfo2 mbstowcs memalign mempcpy @@ -1603,8 +1602,7 @@ dnl AC_MSG_CHECKING([whether we can link with -static]) AC_CACHE_VAL(ac_cv_e2fsprogs_use_static, [SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS_STATIC -static" -AC_TRY_LINK([#include ],[fflush(stdout);], - ac_cv_e2fsprogs_use_static=yes, ac_cv_e2fsprogs_use_static=no) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[fflush(stdout);]])],[ac_cv_e2fsprogs_use_static=yes],[ac_cv_e2fsprogs_use_static=no]) LDFLAGS=$SAVE_LDFLAGS]) dnl dnl Regardless of how the test turns out, Solaris doesn't handle -static @@ -1785,7 +1783,18 @@ AS_IF([test "x${with_systemd_unit_dir}" != "xno"], ]) AC_SUBST(have_systemd) AC_SUBST(systemd_system_unit_dir) - +dnl Adjust the compiled files if we are on windows vs everywhere else +dnl +OS_IO_FILE="" +[case "$host_os" in + cigwin*|mingw*|msys*) + OS_IO_FILE=windows_io + ;; + *) + OS_IO_FILE=unix_io + ;; +esac] +AC_SUBST(OS_IO_FILE) dnl dnl Make our output files, being sure that we create the some miscellaneous dnl directories @@ -1815,5 +1824,6 @@ for i in MCONFIG Makefile \ outlist="$outlist $i" fi done -AC_OUTPUT($outlist) +AC_CONFIG_FILES([$outlist]) +AC_OUTPUT if test -f util/gen-tarball; then chmod +x util/gen-tarball; fi