AX_GCC_OPTION([-fstack-protector], [], [], [
CFLAGS="$CFLAGS -fstack-protector"
], [])
-AX_LD_CHECK_FLAG([-Wl,-z,noexecstack], [], [], [
- LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
-], [])
-AX_LD_CHECK_FLAG([-Wa,--noexecstack], [], [], [
- CFLAGS="$CFLAGS -Wa,--noexecstack"
-], [])
-
+case "${build_os}" in
+ *linux*)
+ # These might be linux-specific and aren't always caught as not
+ # supported by configure
+ AX_LD_CHECK_FLAG([-Wl,-z,noexecstack], [], [], [
+ LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
+ ], [])
+ AX_LD_CHECK_FLAG([-Wa,--noexecstack], [], [], [
+ CFLAGS="$CFLAGS -Wa,--noexecstack"
+ ], [])
+ ;;
+esac
if test "${CTAGS+set}" != "set" -a "${EXCTAGS+set}" = "set"; then
AC_CHECK_FUNCS([getuid geteuid seteuid getpriority setpriority])
AC_CHECK_FUNCS([socketpair sigaction sigprocmask posix_memalign writev])
AC_CHECK_FUNCS([fcntl pselect poll ppoll pollts kqueue epoll_ctl inotify_init])
-AC_CHECK_FUNCS([pread pwrite posix_fadvise posix_fallocate])
+AC_CHECK_FUNCS([pread pwrite])
+# Some linux OSes (Old redhat, others?) will see these functions
+# through an AC_CHECK_FUNCS but not when it comes time to actually use
+# them in source.
+AC_MSG_CHECKING([for posix_fallocate])
+AC_LINK_IFELSE([
+#define _XOPEN_SOURCE 600
+#include <fcntl.h>
+
+int
+main(void)
+{
+ posix_fallocate(0, 0, 100);
+ return 0;
+}
+],
+[AC_MSG_RESULT(yes)]
+[AC_DEFINE(HAVE_POSIX_FALLOCATE)],
+AC_MSG_RESULT(no))
+AC_MSG_CHECKING([for posix_fadvise and associated constants])
+AC_LINK_IFELSE([
+#define _XOPEN_SOURCE 600
+#include <fcntl.h>
+
+int
+main(void)
+{
+ posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL);
+ return 0;
+}
+],
+[AC_MSG_RESULT(yes)]
+[AC_DEFINE(HAVE_POSIX_FADVISE)],
+AC_MSG_RESULT(no))
AC_FUNC_SNPRINTF
if test "x$ac_cv_have_working_snprintf" = xyes; then
if test "$enable_sql" = yes; then
sql_servers=""
if test "$found_mysql" = yes; then
- sql_servers+="MySQL "
+ sql_servers="MySQL "
fi
if test "$found_postgresql" = yes; then
- sql_servers+="Postgres "
+ sql_servers="${sql_servers} Postgres "
fi
if test "$found_sqlite" = yes; then
- sql_servers+="Sqlite3 "
+ sql_servers="${sql_servers} Sqlite3 "
fi
echo "* SQL support: ${sql_servers:-No}"
else