summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan B├╝hler <stbuehler@web.de>2017-10-25 21:28:17 +0200
committerGlenn Strauss <gstrauss@gluelogic.com>2017-10-28 22:48:12 -0400
commit955b029f2f421d7cc394bbabca3afefe3770aee2 (patch)
tree16fea3e702cae588022795cf8a3fedd011a431d2
parent41cd7d25a8aa5b7413c06e80c3b42defa82d37d4 (diff)
downloadlighttpd1.4-955b029f2f421d7cc394bbabca3afefe3770aee2.tar.gz
lighttpd1.4-955b029f2f421d7cc394bbabca3afefe3770aee2.zip
[autobuild] move some checks to the top
Moved some generic checks from the middle of the "feature checks" to the top.
-rw-r--r--configure.ac47
1 files changed, 23 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac
index 3be2c793..146ac111 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,29 @@ AC_CHECK_TYPES([socklen_t],
dnl Checks for library functions.
AC_FUNC_FORK
+dnl openssl on solaris needs -lsocket -lnsl
+AC_SEARCH_LIBS([socket], [socket])
+AC_SEARCH_LIBS([gethostbyname], [nsl socket])
+
+dnl On Haiku accept() and friends are in libnetwork
+AC_SEARCH_LIBS([accept], [network])
+
+dnl clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms
+AC_SEARCH_LIBS([clock_gettime], [rt])
+
+dnl need dlopen/-ldl to load plugins (when not on windows)
+save_LIBS=$LIBS
+LIBS=
+AC_SEARCH_LIBS([dlopen], [dl], [
+ AC_CHECK_HEADERS([dlfcn.h], [
+ DL_LIB=$LIBS
+ AC_DEFINE([HAVE_LIBDL], [1], [libdl])
+ AC_DEFINE([HAVE_DLFCN_H], [1])
+ ])
+])
+LIBS=$save_LIBS
+AC_SUBST([DL_LIB])
+
dnl prepare pkg-config usage below
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
@@ -408,30 +431,6 @@ if test "$WITH_ATTR" != no; then
fi
fi
-dnl openssl on solaris needs -lsocket -lnsl
-AC_SEARCH_LIBS([socket], [socket])
-AC_SEARCH_LIBS([gethostbyname], [nsl socket])
-
-dnl On Haiku accept() and friends are in libnetwork
-AC_SEARCH_LIBS([accept], [network])
-
-dnl clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms
-AC_SEARCH_LIBS([clock_gettime], [rt])
-
-save_LIBS=$LIBS
-AC_SEARCH_LIBS([dlopen], [dl], [
- AC_CHECK_HEADERS([dlfcn.h], [
- if test "$ac_cv_search_dlopen" != no; then
- test "$ac_cv_search_dlopen" = "none required" || DL_LIB="$ac_cv_search_dlopen"
- fi
-
- AC_DEFINE([HAVE_LIBDL], [1], [libdl])
- AC_DEFINE([HAVE_DLFCN_H], [1])
- ])
-])
-LIBS=$save_LIBS
-AC_SUBST([DL_LIB])
-
dnl Check for valgrind
AC_MSG_NOTICE([----------------------------------------])
AC_MSG_CHECKING([for valgrind])