diff options
author | Akira TAGOH <akira@tagoh.org> | 2015-02-10 19:32:13 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2015-02-23 15:21:08 +0900 |
commit | ed0d705e2221adbfb21de357c1a82b7a2a5c3641 (patch) | |
tree | bf82d741f6ba8411a2186ef0f1ce06613c083e7d /configure.ac | |
parent | d6d5adeb7940c0d0beb86489c2a1c2ce59e5c044 (diff) |
Fix a build fail on some non-POSIX platforms
Use own scandir function. according to this change,
we don't need -Werror things in configure anymore.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/configure.ac b/configure.ac index 9011f37a..1e704cdc 100644 --- a/configure.ac +++ b/configure.ac @@ -105,7 +105,6 @@ AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes) AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) WARN_CFLAGS="" -WERROR_CFLAGS="-Werror" WARNING_CPP_DIRECTIVE="no" if test "x$GCC" = "xyes"; then WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \ @@ -114,8 +113,6 @@ if test "x$GCC" = "xyes"; then WARNING_CPP_DIRECTIVE="yes" elif test "x$SUNCC" = "xyes"; then WARN_CFLAGS="-v -fd" - WERROR_CFLAGS="-errtags \ - -errwarn=%all,no%E_OLD_STYLE_FUNC_DEF,no%E_STATEMENT_NOT_REACHED" WARNING_CPP_DIRECTIVE="yes" fi if test "x$WARNING_CPP_DIRECTIVE" = "xyes"; then @@ -167,38 +164,6 @@ dnl AC_CHECK_FUNCS doesn't check for header files. dnl posix_fadvise() may be not available in older libc. AC_CHECK_SYMBOL([posix_fadvise], [fcntl.h], [fc_func_posix_fadvise=1], [fc_func_posix_fadvise=0]) AC_DEFINE_UNQUOTED([HAVE_POSIX_FADVISE], [$fc_func_posix_fadvise], [Define to 1 if you have the 'posix_fadvise' function.]) -if test "$os_win32" = "no"; then - AC_MSG_CHECKING([for scandir]) - fc_saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $WARN_CFLAGS $WERROR_CFLAGS" - AC_TRY_COMPILE([ - #include <dirent.h> - int main(void); - ], [ - int (* comp) (const struct dirent **, const struct dirent **) = 0; - struct dirent **d; - return scandir(".", &d, 0, comp) >= 0; - ], [ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SCANDIR], [1], [Define to 1 if you have the 'scandir' function.]) - ], [ - AC_TRY_COMPILE([ - #include <dirent.h> - int main(void); - ], [ - int (* comp) (const void *, const void *) = 0; - struct dirent **d; - return scandir(".", &d, 0, comp) >= 0; - ], [ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SCANDIR_VOID_P], [1], [Define to 1 if you have the 'scandir' function with int (* compar)(const void *, const void *)]) - ],[ - AC_MSG_ERROR([ -*** No scandir function available.]) - ]) - ]) -fi -CFLAGS="$fc_saved_CFLAGS" # if test "x$ac_cv_func_fstatvfs" = "xyes"; then |