Whamcloud - gitweb
Many files:
[tools/e2fsprogs.git] / configure.in
index 63609f6..513b05c 100644 (file)
@@ -13,7 +13,9 @@ DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
 MONTH=`echo $DATE | awk -F- '{print $2}'`
 YEAR=`echo $DATE | awk -F- '{print $3}'`
 
-if expr $YEAR ">" 90 >/dev/null ; then
+if expr $YEAR ">" 1900 > /dev/null ; then
+       E2FSPROGS_YEAR=$YEAR
+elif expr $YEAR ">" 90 >/dev/null ; then
        E2FSPROGS_YEAR=19$YEAR
 else
        E2FSPROGS_YEAR=20$YEAR
@@ -316,7 +318,7 @@ AC_CHECK_TOOL(STRIP, strip, :)
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_C_CROSS
-AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h mntent.h paths.h dirent.h getopt.h setjmp.h linux/fd.h linux/major.h sys/disklabel.h sys/sockio.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h)
+AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h linux/fd.h linux/major.h sys/disklabel.h sys/sockio.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h)
 AC_FUNC_VPRINTF
 dnl
 dnl See if struct dirent has a d_namlen field (like bsd systems), implying
@@ -389,7 +391,7 @@ AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags)
 if test "$e2fsprogs_cv_struct_st_flags" = yes; then
   AC_DEFINE(HAVE_STAT_FLAGS)
 fi
-AC_CHECK_FUNCS(chflags getrusage llseek strdup getmntinfo strcasecmp srandom fchown)
+AC_CHECK_FUNCS(chflags getrusage llseek strdup getmntinfo strcasecmp srandom fchown mallinfo)
 dnl
 dnl Check to see if ino_t is defined
 dnl
@@ -488,6 +490,18 @@ AC_CACHE_VAL(ac_cv_e2fsprogs_use_static,
 AC_TRY_LINK([#include <stdio.h>],[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
+dnl This is caused by the socket library requiring the nsl library, which
+dnl requires the -dl library, which only works for dynamically linked 
+dnl programs.  It basically means you can't have statically linked programs
+dnl which use the network under Solaris.  
+dnl
+case "$host_os" in
+solaris2.*)
+       ac_cv_e2fsprogs_use_static=no   
+;;
+esac
 AC_MSG_RESULT($ac_cv_e2fsprogs_use_static)
 LDFLAG_STATIC=
 if test $ac_cv_e2fsprogs_use_static = yes; then
@@ -522,6 +536,7 @@ dnl
 test -d lib || mkdir lib
 test -d include || mkdir include
 test -d include/linux || mkdir include/linux
+test -d include/asm || mkdir include/asm
 rmakefile=
 if test -d ${srcdir}/resize ; then
    rmakefile=resize/Makefile