Browse Source

Fix configure/cmake defines and checks

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2364 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.21
Stefan Bühler 13 years ago
parent
commit
0dea6999b5
  1. 2
      configure.in
  2. 55
      src/CMakeLists.txt
  3. 19
      src/config.h.cmake

2
configure.in

@ -463,7 +463,7 @@ AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \
strdup strerror strstr strtol sendfile getopt socket lstat \
gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot \
getuid select signal pathconf madvise posix_fadvise posix_madvise \
writev sigaction sendfile64 send_file kqueue port_create localtime_r])
writev sigaction sendfile64 send_file kqueue port_create localtime_r gmtime_r])
AC_MSG_CHECKING(for Large File System support)
AC_ARG_ENABLE(lfs,

55
src/CMakeLists.txt

@ -59,7 +59,6 @@ CHECK_INCLUDE_FILES(sys/uio.h HAVE_SYS_UIO_H)
CHECK_INCLUDE_FILES(sys/un.h HAVE_SYS_UN_H)
CHECK_INCLUDE_FILES(sys/wait.h HAVE_SYS_WAIT_H)
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES(time.h HAVE_TIME_H)
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
CHECK_INCLUDE_FILES(pthread.h HAVE_PTHREAD_H)
CHECK_INCLUDE_FILES(getopt.h HAVE_GETOPT_H)
@ -70,6 +69,10 @@ CHECK_INCLUDE_FILES(stddef.h HAVE_STDDEF_H)
CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILES(syslog.h HAVE_SYSLOG_H)
# check for fastcgi lib, for the tests only
CHECK_INCLUDE_FILES(fastcgi.h HAVE_FASTCGI_H)
CHECK_INCLUDE_FILES(fastcgi/fastcgi.h HAVE_FASTCGI_FASTCGI_H)
CHECK_INCLUDE_FILES(crypt.h HAVE_CRYPT_H)
IF(HAVE_CRYPT_H)
## check if we need libcrypt for crypt()
@ -111,6 +114,7 @@ CHECK_FUNCTION_EXISTS(pread HAVE_PREAD)
CHECK_FUNCTION_EXISTS(posix_fadvise HAVE_POSIX_FADVISE)
CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
CHECK_FUNCTION_EXISTS(sendfile HAVE_SENDFILE)
CHECK_FUNCTION_EXISTS(send_file HAVE_SEND_FILE)
CHECK_FUNCTION_EXISTS(sendfile64 HAVE_SENDFILE64)
CHECK_FUNCTION_EXISTS(sendfilev HAVE_SENDFILEV)
CHECK_FUNCTION_EXISTS(sigaction HAVE_SIGACTION)
@ -157,6 +161,7 @@ ENDMACRO(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
IF(WITH_XATTR)
CHECK_INCLUDE_FILES(attr/attributes.h HAVE_ATTR_ATTRIBUTES_H)
CHECK_LIBRARY_EXISTS(attr attr_get "" HAVE_XATTR)
ENDIF(WITH_XATTR)
IF(WITH_MYSQL)
@ -166,7 +171,7 @@ IF(WITH_MYSQL)
CHECK_INCLUDE_FILES(mysql.h HAVE_MYSQL_H)
SET(CMAKE_REQUIRED_INCLUDES)
IF(HAVE_MYSQL_H)
CHECK_LIBRARY_EXISTS(mysqlclient mysql_real_connect "" HAVE_LIBMYSQL)
CHECK_LIBRARY_EXISTS(mysqlclient mysql_real_connect "" HAVE_MYSQL)
ENDIF(HAVE_MYSQL_H)
ENDIF(WITH_MYSQL)
@ -266,7 +271,7 @@ IF(WITH_SQLITE3)
ENDIF(WITH_SQLITE3)
IF(WITH_UUID)
CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_UUID_H)
CHECK_LIBRARY_EXISTS(uuid uuid_generate "" NEED_LIBUUID)
IF(NOT NEED_LIBUUID)
CHECK_FUNCTION_EXISTS(uuid_generate HAVE_LIBUUID)
@ -307,6 +312,19 @@ IF(WITH_ZLIB)
ENDIF(NOT WIN32)
ENDIF(WITH_ZLIB)
IF(WITH_BZIP)
CHECK_INCLUDE_FILES(bzlib.h HAVE_BZLIB_H)
CHECK_LIBRARY_EXISTS(bz2 BZ2_bzCompress "" HAVE_LIBBZ2)
ENDIF(WITH_BZIP)
IF(WITH_LDAP)
CHECK_INCLUDE_FILES(ldap.h HAVE_LDAP_H)
CHECK_LIBRARY_EXISTS(ldap ldap_bind "" HAVE_LIBLDAP)
CHECK_INCLUDE_FILES(lber.h HAVE_LBER_H)
CHECK_LIBRARY_EXISTS(lber ber_printf "" HAVE_LIBLBER)
SET(LDAP_DEPRECATED 1) # Using deprecated ldap api
ENDIF(WITH_LDAP)
IF(WITH_LUA)
pkg_search_module(LUA REQUIRED lua lua5.1)
MESSAGE(STATUS "found lua at: INCDIR: ${LUA_INCLUDE_DIRS} LIBDIR: ${LUA_LIBRARY_DIRS} LDFLAGS: ${LUA_LDFLAGS} CFLAGS: ${LUA_CFLAGS}")
@ -314,6 +332,25 @@ IF(WITH_LUA)
SET(HAVE_LUA_H 1 "Have liblua header")
ENDIF(WITH_LUA)
IF(WITH_FAM)
CHECK_INCLUDE_FILES(fam.h HAVE_FAM_H)
CHECK_LIBRARY_EXISTS(fam FAMOpen2 "" HAVE_LIBFAM)
IF(HAVE_LIBFAM)
SET(CMAKE_REQUIRED_LIBRARIES fam)
CHECK_FUNCTION_EXISTS(FAMNoExists HAVE_FAMNOEXISTS)
ENDIF(HAVE_LIBFAM)
ENDIF(WITH_FAM)
IF(WITH_GDBM)
CHECK_INCLUDE_FILES(gdbm.h HAVE_GDBM_H)
CHECK_LIBRARY_EXISTS(gdbm gdbm_open "" HAVE_GDBM)
ENDIF(WITH_GDBM)
IF(WITH_MEMCACHE)
CHECK_INCLUDE_FILES(memcache.h HAVE_MEMCACHE_H)
CHECK_LIBRARY_EXISTS(memcache mc_new "" HAVE_MEMCACHE)
ENDIF(WITH_MEMCACHE)
IF(NOT BUILD_STATIC)
CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
ENDIF(NOT BUILD_STATIC)
@ -501,6 +538,18 @@ IF(HAVE_ZLIB_H)
ENDIF(HAVE_BZLIB_H)
ENDIF(HAVE_ZLIB_H)
IF(HAVE_LIBFAM)
TARGET_LINK_LIBRARIES(lighttpd fam)
ENDIF(HAVE_LIBFAM)
IF(HAVE_GDBM_H)
TARGET_LINK_LIBRARIES(mod_trigger_b4_dl gdbm)
ENDIF(HAVE_GDBM_H)
IF(HAVE_MEMCACHE_H)
TARGET_LINK_LIBRARIES(mod_trigger_b4_dl memcache)
ENDIF(HAVE_MEMCACHE_H)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -g -Wshadow -W -pedantic")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2")

19
src/config.h.cmake

@ -19,7 +19,6 @@
#cmakedefine HAVE_SYS_UN_H
#cmakedefine HAVE_SYS_WAIT_H
#cmakedefine HAVE_SYS_TIME_H
#cmakedefine HAVE_TIME_H
#cmakedefine HAVE_UNISTD_H
#cmakedefine HAVE_PTHREAD_H
#cmakedefine HAVE_INET_ATON
@ -27,10 +26,11 @@
/* XATTR */
#cmakedefine HAVE_ATTR_ATTRIBUTES_H
#cmakedefine HAVE_XATTR
/* mySQL */
#cmakedefine HAVE_MYSQL_H
#cmakedefine HAVE_LIBMYSQL
#cmakedefine HAVE_MYSQL
/* OpenSSL */
#cmakedefine HAVE_OPENSSL_SSL_H
@ -44,6 +44,7 @@
/* FAM */
#cmakedefine HAVE_FAM_H
#cmakedefine HAVE_FAMNOEXISTS
/* getopt */
#cmakedefine HAVE_GETOPT_H
@ -53,6 +54,9 @@
/* LDAP */
#cmakedefine HAVE_LDAP_H
#cmakedefine HAVE_LIBLDAP
#cmakedefine HAVE_LBER_H
#cmakedefine HAVE_LIBLBER
#cmakedefine LDAP_DEPRECATED 1
/* XML */
#cmakedefine HAVE_LIBXML_H
@ -74,7 +78,7 @@
#cmakedefine HAVE_SYSLOG_H
/* UUID */
#cmakedefine HAVE_UUID_H
#cmakedefine HAVE_UUID_UUID_H
#cmakedefine HAVE_LIBUUID
/* ZLIB */
@ -85,6 +89,13 @@
#cmakedefine HAVE_LUA_H
#cmakedefine HAVE_LIBLUA
/* gdbm */
#cmakedefine HAVE_GDBM_H
#cmakedefine HAVE_GDBM
/* memcache */
#cmakedefine HAVE_MEMCACHE_H
/* inotify */
#cmakedefine HAVE_INOTIFY_INIT
#cmakedefine HAVE_SYS_INOTIFY_H
@ -118,6 +129,7 @@
#cmakedefine HAVE_POSIX_FADVISE
#cmakedefine HAVE_SELECT
#cmakedefine HAVE_SENDFILE
#cmakedefine HAVE_SEND_FILE
#cmakedefine HAVE_SENDFILE64
#cmakedefine HAVE_SENDFILEV
#cmakedefine HAVE_SIGACTION
@ -128,6 +140,7 @@
#cmakedefine HAVE_WRITEV
/* libcrypt */
#cmakedefine HAVE_CRYPT_H
#cmakedefine HAVE_LIBCRYPT
/* fastcgi */

Loading…
Cancel
Save