Commit 76f2929e authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Omit redundant preprocessor checks when checking for header files at the configure time.

parent 321b8d58
...@@ -66,9 +66,7 @@ AC_FUNC_MMAP ...@@ -66,9 +66,7 @@ AC_FUNC_MMAP
AC_CHECK_MEMBERS([struct stat.st_blksize]) AC_CHECK_MEMBERS([struct stat.st_blksize])
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Checks for header files # Checks for header files
AC_CHECK_HEADERS([malloc.h]) AC_CHECK_HEADERS([malloc.h unistd.h sys/time.h],,,[AC_INCLUDES_DEFAULT])
AC_CHECK_HEADERS([unistd.h])
AC_CHECK_HEADERS([sys/time.h])
AX_EXECINFO AX_EXECINFO
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Checks for the availability of functions # Checks for the availability of functions
...@@ -219,8 +217,7 @@ main(int argc, char **argv) ...@@ -219,8 +217,7 @@ main(int argc, char **argv)
[HAVE_PARALLEL_NC4=1], [HAVE_PARALLEL_NC4=1],
[AC_MSG_WARN([The supplied netCDF library does not support MPI parallel invocations])], [AC_MSG_WARN([The supplied netCDF library does not support MPI parallel invocations])],
[AC_INCLUDES_DEFAULT [AC_INCLUDES_DEFAULT
@%:@include <netcdf.h>]) @%:@include <netcdf.h>])], [AC_INCLUDES_DEFAULT])
])
dnl parallel netCDF support still requires ScalES-PPM and YAXT to dnl parallel netCDF support still requires ScalES-PPM and YAXT to
dnl re-arrange the data when running with more than one collector dnl re-arrange the data when running with more than one collector
PKG_CHECK_MODULES([PPM_CORE],[scales-ppm-core], PKG_CHECK_MODULES([PPM_CORE],[scales-ppm-core],
...@@ -302,7 +299,7 @@ AC_ARG_ENABLE([ruby], ...@@ -302,7 +299,7 @@ AC_ARG_ENABLE([ruby],
CPPFLAGS="$CPPFLAGS $RUBY_INCLUDES" CPPFLAGS="$CPPFLAGS $RUBY_INCLUDES"
AC_CHECK_HEADER([ruby.h],,[enable_ruby=no AC_CHECK_HEADER([ruby.h],,[enable_ruby=no
RUBY= RUBY=
]) ], [AC_INCLUDES_DEFAULT])
CPPFLAGS=$save_CPPFLAGS CPPFLAGS=$save_CPPFLAGS
AS_IF([test "x$RUBY" != "x"], AS_IF([test "x$RUBY" != "x"],
[AS_IF([test "x$SWIG" = "x"], [AS_IF([test "x$SWIG" = "x"],
...@@ -327,7 +324,7 @@ AC_ARG_ENABLE(python, ...@@ -327,7 +324,7 @@ AC_ARG_ENABLE(python,
save_CPPFLAGS=$CPPFLAGS save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
AC_CHECK_HEADER([Python.h],[enable_python=yes AC_CHECK_HEADER([Python.h],[enable_python=yes
break]) break],,[AC_INCLUDES_DEFAULT])
CPPFLAGS=$save_CPPFLAGS CPPFLAGS=$save_CPPFLAGS
done done
AS_IF([test "x$enable_python" != "xno"], AS_IF([test "x$enable_python" != "xno"],
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#serial 1 #serial 1
AC_DEFUN([AX_EXECINFO], AC_DEFUN([AX_EXECINFO],
[AC_CHECK_HEADERS([execinfo.h]) [AC_CHECK_HEADERS([execinfo.h], [], [], [AC_INCLUDES_DEFAULT])
AS_IF([test x"$ac_cv_header_execinfo_h" = xyes], AS_IF([test x"$ac_cv_header_execinfo_h" = xyes],
[AC_CACHE_CHECK([size parameter type for backtrace()], [AC_CACHE_CHECK([size parameter type for backtrace()],
[ax_cv_proto_backtrace_type], [ax_cv_proto_backtrace_type],
......
...@@ -20,7 +20,7 @@ AS_CASE([$with_threads], ...@@ -20,7 +20,7 @@ AS_CASE([$with_threads],
[*],[THREADS_ROOT=$with_threads [*],[THREADS_ROOT=$with_threads
LDFLAGS="-L$THREADS_ROOT/lib $LDFLAGS" LDFLAGS="-L$THREADS_ROOT/lib $LDFLAGS"
CPPFLAGS="-I$THREADS_ROOT/include $CPPFLAGS " CPPFLAGS="-I$THREADS_ROOT/include $CPPFLAGS "
AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS([pthread.h],,,[AC_INCLUDES_DEFAULT])
AC_CHECK_LIB([pthread],[pthread_create]) AC_CHECK_LIB([pthread],[pthread_create])
THREADS_LIBS=" -L$THREADS_ROOT/lib -lpthread" THREADS_LIBS=" -L$THREADS_ROOT/lib -lpthread"
THREADS_INCLUDE=" -I$THREADS_ROOT/include"]) THREADS_INCLUDE=" -I$THREADS_ROOT/include"])
...@@ -35,7 +35,7 @@ AC_ARG_WITH([szlib], ...@@ -35,7 +35,7 @@ AC_ARG_WITH([szlib],
[AS_CASE(["$with_szlib"], [AS_CASE(["$with_szlib"],
[no],[AC_MSG_CHECKING([for szlib library]) [no],[AC_MSG_CHECKING([for szlib library])
AC_MSG_RESULT([suppressed])], AC_MSG_RESULT([suppressed])],
[yes],[AC_CHECK_HEADERS(szlib.h) [yes],[AC_CHECK_HEADERS([szlib.h],,,[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([SZ_BufftoBuffCompress], AC_SEARCH_LIBS([SZ_BufftoBuffCompress],
[sz], [sz],
[AC_DEFINE([HAVE_LIBSZ],[1],[Define to 1 for SZIP support])], [AC_DEFINE([HAVE_LIBSZ],[1],[Define to 1 for SZIP support])],
...@@ -45,7 +45,7 @@ AC_ARG_WITH([szlib], ...@@ -45,7 +45,7 @@ AC_ARG_WITH([szlib],
AS_IF([test -d "$SZLIB_ROOT"], AS_IF([test -d "$SZLIB_ROOT"],
[LDFLAGS="-L$SZLIB_ROOT/lib $LDFLAGS" [LDFLAGS="-L$SZLIB_ROOT/lib $LDFLAGS"
CPPFLAGS="-I$SZLIB_ROOT/include $CPPFLAGS" CPPFLAGS="-I$SZLIB_ROOT/include $CPPFLAGS"
AC_CHECK_HEADERS(szlib.h) AC_CHECK_HEADERS([szlib.h],,,[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([SZ_BufftoBuffCompress], AC_SEARCH_LIBS([SZ_BufftoBuffCompress],
[sz], [sz],
[AC_DEFINE([HAVE_LIBSZ],[1],[Define to 1 for SZIP support])], [AC_DEFINE([HAVE_LIBSZ],[1],[Define to 1 for SZIP support])],
...@@ -72,7 +72,8 @@ AC_ARG_WITH([netcdf], ...@@ -72,7 +72,8 @@ AC_ARG_WITH([netcdf],
[no],[AC_MSG_CHECKING([for NetCDF library]) [no],[AC_MSG_CHECKING([for NetCDF library])
AC_MSG_RESULT([suppressed])], AC_MSG_RESULT([suppressed])],
[yes],[AC_CHECK_HEADERS([netcdf.h],, [yes],[AC_CHECK_HEADERS([netcdf.h],,
[AC_MSG_ERROR([Could not find netcdf.h])]) [AC_MSG_ERROR([Could not find netcdf.h])],
[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([nc_open], AC_SEARCH_LIBS([nc_open],
[netcdf], [netcdf],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NetCDF support]) [AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NetCDF support])
...@@ -85,7 +86,8 @@ AC_ARG_WITH([netcdf], ...@@ -85,7 +86,8 @@ AC_ARG_WITH([netcdf],
LDFLAGS="-L$NETCDF_ROOT/lib $LDFLAGS" LDFLAGS="-L$NETCDF_ROOT/lib $LDFLAGS"
CPPFLAGS="-I$NETCDF_ROOT/include $CPPFLAGS" CPPFLAGS="-I$NETCDF_ROOT/include $CPPFLAGS"
AC_CHECK_HEADERS([netcdf.h],, AC_CHECK_HEADERS([netcdf.h],,
[AC_MSG_ERROR([Could not find netcdf.h])]) [AC_MSG_ERROR([Could not find netcdf.h])],
[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([nc_open], AC_SEARCH_LIBS([nc_open],
[netcdf], [netcdf],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NetCDF support]) [AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NetCDF support])
...@@ -166,7 +168,7 @@ AC_ARG_WITH([eccodes], ...@@ -166,7 +168,7 @@ AC_ARG_WITH([eccodes],
[AS_CASE(["$with_eccodes"], [AS_CASE(["$with_eccodes"],
[no],[AC_MSG_CHECKING([for ECCODES library]) [no],[AC_MSG_CHECKING([for ECCODES library])
AC_MSG_RESULT([suppressed])], AC_MSG_RESULT([suppressed])],
[yes],[AC_CHECK_HEADERS([grib_api.h]) [yes],[AC_CHECK_HEADERS([grib_api.h],,,[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([grib_get_message], AC_SEARCH_LIBS([grib_get_message],
[eccodes], [eccodes],
[AC_DEFINE([HAVE_LIBGRIB_API],[1],[ECCODES library is present if defined to 1])], [AC_DEFINE([HAVE_LIBGRIB_API],[1],[ECCODES library is present if defined to 1])],
...@@ -175,7 +177,7 @@ AC_ARG_WITH([eccodes], ...@@ -175,7 +177,7 @@ AC_ARG_WITH([eccodes],
AS_IF([test -d "$ECCODES_ROOT"], AS_IF([test -d "$ECCODES_ROOT"],
[LDFLAGS="-L$ECCODES_ROOT/lib $LDFLAGS" [LDFLAGS="-L$ECCODES_ROOT/lib $LDFLAGS"
CPPFLAGS="-I$ECCODES_ROOT/include $CPPFLAGS" CPPFLAGS="-I$ECCODES_ROOT/include $CPPFLAGS"
AC_CHECK_HEADERS([grib_api.h]) AC_CHECK_HEADERS([grib_api.h],,,[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([grib_get_message], AC_SEARCH_LIBS([grib_get_message],
[eccodes], [eccodes],
[AC_DEFINE([HAVE_LIBGRIB_API],[1],[ECCODES library is present if defined to 1])], [AC_DEFINE([HAVE_LIBGRIB_API],[1],[ECCODES library is present if defined to 1])],
...@@ -198,7 +200,7 @@ AC_ARG_WITH([grib_api], ...@@ -198,7 +200,7 @@ AC_ARG_WITH([grib_api],
[AS_CASE(["$with_grib_api"], [AS_CASE(["$with_grib_api"],
[no],[AC_MSG_CHECKING([for GRIB_API library]) [no],[AC_MSG_CHECKING([for GRIB_API library])
AC_MSG_RESULT([suppressed])], AC_MSG_RESULT([suppressed])],
[yes],[AC_CHECK_HEADERS([grib_api.h]) [yes],[AC_CHECK_HEADERS([grib_api.h],,,[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([grib_get_message], AC_SEARCH_LIBS([grib_get_message],
[grib_api], [grib_api],
[AC_DEFINE([HAVE_LIBGRIB_API],[1],[GRIB_API library is present if defined to 1])], [AC_DEFINE([HAVE_LIBGRIB_API],[1],[GRIB_API library is present if defined to 1])],
...@@ -207,7 +209,7 @@ AC_ARG_WITH([grib_api], ...@@ -207,7 +209,7 @@ AC_ARG_WITH([grib_api],
AS_IF([test -d "$GRIB_API_ROOT"], AS_IF([test -d "$GRIB_API_ROOT"],
[LDFLAGS="-L$GRIB_API_ROOT/lib $LDFLAGS" [LDFLAGS="-L$GRIB_API_ROOT/lib $LDFLAGS"
CPPFLAGS="-I$GRIB_API_ROOT/include $CPPFLAGS" CPPFLAGS="-I$GRIB_API_ROOT/include $CPPFLAGS"
AC_CHECK_HEADERS([grib_api.h]) AC_CHECK_HEADERS([grib_api.h],,,[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([grib_get_message], AC_SEARCH_LIBS([grib_get_message],
[grib_api], [grib_api],
[AC_DEFINE([HAVE_LIBGRIB_API],[1],[GRIB_API library is present if defined to 1])], [AC_DEFINE([HAVE_LIBGRIB_API],[1],[GRIB_API library is present if defined to 1])],
......
...@@ -114,7 +114,7 @@ AC_DEFUN([ACX_UUID], ...@@ -114,7 +114,7 @@ AC_DEFUN([ACX_UUID],
AC_CHECK_HEADERS([uuid/uuid.h], AC_CHECK_HEADERS([uuid/uuid.h],
[AC_CHECK_DECLS([uuid_generate],, [AC_CHECK_DECLS([uuid_generate],,
[have_util_linux_uuid_c_bindings=no],[AC_INCLUDES_DEFAULT [have_util_linux_uuid_c_bindings=no],[AC_INCLUDES_DEFAULT
@%:@include <uuid/uuid.h>])],[have_util_linux_uuid_c_bindings=no]) @%:@include <uuid/uuid.h>])],[have_util_linux_uuid_c_bindings=no],[AC_INCLUDES_DEFAULT])
CPPFLAGS=$acx_save_CPPFLAGS])], CPPFLAGS=$acx_save_CPPFLAGS])],
[have_util_linux_uuid_c_bindings=no]) [have_util_linux_uuid_c_bindings=no])
AS_IF([test x"$enable_ossp_uuid" != xno -a x"$have_util_linux_uuid_c_bindings" = xno], AS_IF([test x"$enable_ossp_uuid" != xno -a x"$have_util_linux_uuid_c_bindings" = xno],
...@@ -146,7 +146,7 @@ AC_INCLUDES_DEFAULT]) ...@@ -146,7 +146,7 @@ AC_INCLUDES_DEFAULT])
[AC_CHECK_DECLS([uuid_create], [AC_CHECK_DECLS([uuid_create],
[have_dce_uuid_c_bindings=yes], [have_dce_uuid_c_bindings=yes],
[have_dce_uuid_c_bindings=no],[AC_INCLUDES_DEFAULT [have_dce_uuid_c_bindings=no],[AC_INCLUDES_DEFAULT
@%:@include <uuid.h>])],[have_dce_uuid_c_bindings=yes]) @%:@include <uuid.h>])],[have_dce_uuid_c_bindings=yes], [AC_INCLUDES_DEFAULT])
CPPFLAGS=$acx_save_CPPFLAGS])]) CPPFLAGS=$acx_save_CPPFLAGS])])
AS_IF([test x"$have_util_linux_uuid_c_bindings" = xyes], AS_IF([test x"$have_util_linux_uuid_c_bindings" = xyes],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment