Browse Source

Fix compile on FreeBSD

personal/stbuehler/wip
Stefan Bühler 11 years ago
parent
commit
06b40f5ff4
  1. 3
      configure.ac
  2. 6
      src/CMakeLists.txt

3
configure.ac

@ -124,6 +124,9 @@ AC_HEADER_TIME
AC_SEARCH_LIBS([socket],[socket])
AC_SEARCH_LIBS([inet_addr],[nsl socket])
## freebsd: kvm
AC_SEARCH_LIBS([kvm_open],[kvm])
# Checks for library functions.
AC_CHECK_FUNCS([ \
chroot \

6
src/CMakeLists.txt

@ -57,6 +57,8 @@ IF(HAVE_LIBCRYPT)
SET(HAVE_CRYPT_R 1 FORCE)
ENDIF(HAVE_LIBCRYPT)
CHECK_LIBRARY_EXISTS(kvm kvm_open "" HAVE_LIBKVM)
CHECK_TYPE_SIZE(long SIZEOF_LONG)
CHECK_TYPE_SIZE(off_t SIZEOF_OFF_T)
@ -377,6 +379,10 @@ ADD_TARGET_PROPERTIES(lighttpd2 COMPILE_FLAGS ${COMMON_CFLAGS})
ADD_TARGET_PROPERTIES(lighttpd2-angel LINK_FLAGS ${COMMON_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd2-angel COMPILE_FLAGS ${COMMON_CFLAGS})
IF(HAVE_LIBKVM)
TARGET_LINK_LIBRARIES(lighttpd-${PACKAGE_VERSION}-common kvm)
ENDIF(HAVE_LIBKVM)
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")

Loading…
Cancel
Save