From 1ffb4977579b68f04d42367f69cdca38c651024f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 24 Feb 2015 09:18:49 -0500 Subject: [PATCH] add lowercase test for BSD, add check for sendmail, don't check for libdl, add check for backtrace --- configure.ac | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/configure.ac b/configure.ac index 0cde4661b..b0cb929ed 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,12 @@ case $host_os in *BSD*) # Do something specific for BSD HOST_OS='BSD' + AC_DEFINE(BSD,1,"This is a BSD system") + ;; + *bsd*) + # Do something specific for BSD + HOST_OS='BSD' + AC_DEFINE(BSD,1,"This is a BSD system") ;; *) #Default Case @@ -315,7 +321,8 @@ AC_FUNC_STRTOD AC_FUNC_VPRINTF AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday memmove memset mkdir munmap posix_memalign putenv select sendfile socket sqrt strcasecmp strchr strcspn strerror strncasecmp strrchr strspn strstr strtol strtoull]) AC_CHECK_FUNCS([syscall sleep usleep ioctl ioctlsocket sigaction]) - +# this is required for freebsd to compile +AC_CHECK_SENDFILE # Other programs AC_CHECK_PROG(OPT_FFMPEG,ffmpeg,yes,no) AC_PATH_PROG(PATH_FFMPEG,ffmpeg) @@ -330,7 +337,10 @@ AC_CHECK_LIB(rt,clock_gettime,,AC_MSG_ERROR(zm requires librt)) AC_SEARCH_LIBS(mysql_init,[mysqlclient mariadbclient],,AC_MSG_ERROR(zm requires libmysqlclient.a or libmariadbclient.a)) AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a)) AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a)) +if test "$BSD" == "0"; then AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) +fi +AC_CHECK_LIB(execinfo,backtrace, , AC_MSG_ERROR([unable to find the backtrace() function])) if test "$ZM_SSL_LIB" == "openssl"; then AC_CHECK_HEADERS(openssl/md5.h,,AC_MSG_WARN(zm requires openssl/md5.h header to be installed for openssl),) AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead])) @@ -470,32 +480,6 @@ fi AC_SUBST(PERL_MM_PARMS) AC_SUBST(EXTRA_PERL_LIB) -# -# Platform specific setup -# -############################# -AC_CANONICAL_HOST -# Check for which host we are on and setup a few things -# specifically based on the host -case $host_os in - darwin* ) - # Do something specific for mac - HOST_OS='darwin' - ;; - linux*) - # Do something specific for linux - HOST_OS='linux' - ;; - *BSD*) - # Do something specific for BSD - HOST_OS='BSD' - ;; - *) - #Default Case - AC_MSG_ERROR([Your platform is not currently supported]) - ;; -esac - AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules onvif/Makefile onvif/scripts/Makefile scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmsystemctl.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/css/classic/Makefile web/skins/classic/css/classic/views/Makefile web/skins/classic/css/flat/Makefile web/skins/classic/css/flat/views/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile]) # Create the definitions for compilation and defaults for the database