Whamcloud - gitweb
build: use MKDIR_P instead of MKINSTALLDIRS
[tools/e2fsprogs.git] / configure.ac
index 4c994da..158e41e 100644 (file)
@@ -124,8 +124,8 @@ else
 fi
 AC_USE_SYSTEM_EXTENSIONS
 dnl
-dnl Set default values for library extentions.  Will be dealt with after
-dnl parsing configuration opions, which may modify these
+dnl Set default values for library extensions.  Will be dealt with after
+dnl parsing configuration options, which may modify these
 dnl
 LIB_EXT=.a
 STATIC_LIB_EXT=.a
@@ -862,6 +862,7 @@ AC_SUBST(BINARY_TYPE)
 AC_PROG_MAKE_SET
 CHECK_GNU_MAKE
 AC_PATH_PROG(LN, ln, ln)
+AC_PROG_MKDIR_P
 AC_PROG_LN_S
 AC_PATH_PROG(MV, mv, mv)
 AC_PATH_PROG(CP, cp, cp)
@@ -918,6 +919,7 @@ AC_CHECK_HEADERS(m4_flatten([
        attr/xattr.h
        linux/falloc.h
        linux/fd.h
+       linux/fsmap.h
        linux/major.h
        linux/loop.h
        linux/types.h
@@ -945,7 +947,27 @@ AC_CHECK_HEADERS(m4_flatten([
        sys/types.h
        sys/un.h
        sys/wait.h
+       sys/xattr.h
 ]))
+dnl Check where to find a dd(1) that supports iflag=fullblock
+dnl and oflag=append
+AC_MSG_CHECKING([for a dd(1) program that supports iflag=fullblock])
+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
+       AC_MSG_RESULT([$DD])
+else
+       AC_MSG_RESULT([not found, using dd])
+       DD=dd
+       AC_MSG_WARN([No GNU-compatible dd(1) program found, expect some self-test failures.])
+fi
+AC_SUBST([DD])
+
 AC_CHECK_HEADERS(net/if.h,,,
 [[
 #if HAVE_SYS_TYPES_H
@@ -957,7 +979,7 @@ AC_CHECK_HEADERS(net/if.h,,,
 ]])
 AC_FUNC_VPRINTF
 dnl Check to see if dirent has member d_reclen. On cygwin those d_reclen
-dnl is not decleared.
+dnl is not declared.
 AC_CHECK_MEMBER(struct dirent.d_reclen,[AC_DEFINE(HAVE_RECLEN_DIRENT, 1,
                       [Define to 1 if dirent has d_reclen])],,
                [#include <dirent.h>])
@@ -1103,6 +1125,7 @@ AC_CHECK_FUNCS(m4_flatten([
        futimes
        getcwd
        getdtablesize
+       gethostname
        getmntinfo
        getpwuid_r
        getrlimit
@@ -1238,16 +1261,20 @@ dnl Test for sem_init, and which library it might require:
 dnl
 AH_TEMPLATE([HAVE_SEM_INIT], [Define to 1 if sem_init() exists])
 SEM_INIT_LIB=''
-AC_CHECK_FUNC(sem_init, ,
-  AC_CHECK_LIB(pthread, sem_init,
+echo GL_THREADS_API: ${gl_threads_api}
+if test "${gl_threads_api}" != none
+then
+  AC_CHECK_FUNC(sem_init, ,
+    AC_CHECK_LIB(pthread, sem_init,
        AC_DEFINE(HAVE_SEM_INIT, 1)
        SEM_INIT_LIB=-lpthread,
-  AC_CHECK_LIB(rt, sem_init,
+    AC_CHECK_LIB(rt, sem_init,
        AC_DEFINE(HAVE_SEM_INIT, 1)
        SEM_INIT_LIB=-lrt,
-  AC_CHECK_LIB(posix4, sem_init,
+    AC_CHECK_LIB(posix4, sem_init,
        AC_DEFINE(HAVE_SEM_INIT, 1)
        SEM_INIT_LIB=-lposix4))))dnl
+fi
 AC_SUBST(SEM_INIT_LIB)
 dnl
 dnl Check for unified diff
@@ -1425,7 +1452,6 @@ if test -n "$WITH_DIET_LIBC" ; then
        INCLUDES="$INCLUDES -D_REENTRANT"
 fi
 AC_SUBST(INCLUDES)
-AM_MKINSTALLDIRS
 dnl
 dnl Build CFLAGS
 dnl