X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=configure.ac;h=c62a19b7ed52840b2992e4218ab0313a53352a94;hb=99dc09b31257a7a2ea257ff883d6a700d533600b;hp=1773570052b2c1db1d03c9cfb74c748e639fef52;hpb=215c2666adfe93a323dcb8d6f4e992c6e7367898;p=dockapps%2Fwmnotify.git diff --git a/configure.ac b/configure.ac index 1773570..c62a19b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,23 +1,19 @@ -# configure.in -- Process this file with autoconf to produce configure. +# configure.ac -- Process this file with autoconf to produce configure. dnl Initialization stuff. -AC_INIT(wmnotify, 0.3.2) -AC_CONFIG_AUX_DIR(config) +AC_INIT(wmnotify, 1.1.0) +AC_CONFIG_AUX_DIR(build-aux) +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR(src/wmnotify.c) AM_CONFIG_HEADER(config.h:config-h.in) dnl Checking if the NEWS file has been updated to reflect the current version. AM_INIT_AUTOMAKE(check-news) +AM_SILENT_RULES([yes]) dnl Testing the C compiler. AC_PROG_CC AC_LANG_C -dnl Checking for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(stdlib.h unistd.h errno.h assert.h) -AC_CHECK_HEADERS(string.h strings.h) - dnl Checking for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T @@ -27,9 +23,8 @@ dnl Basic CFLAGS values CFLAGS="${CFLAGS} -Wall" dnl Checking for POSIX threads library. -ACX_PTHREAD(CC="${PTHREAD_CC}" CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" dnl - LIBS="${PTHREAD_LIBS} ${LIBS}", dnl - echo "Can't find POSIX threads library"; exit 1 ) +ACX_PTHREAD([CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LDFLAGS="$PTHREAD_LIBS $LDFLAGS" CC="$PTHREAD_CC"], + [AC_MSG_ERROR([POSIX thread support required])]) dnl Trying to locate the X window system's includes and libraries, and sets the dnl variables x_includes and x_libraries to their locations. Also adds the @@ -58,12 +53,12 @@ AC_ARG_ENABLE(libsndfile, [ --enable-libsndfile Enable libsndfile support for audible notification (default=yes)], [ac_cv_enable_libsndfile=$enableval], [ac_cv_enable_libsndfile=yes]) AC_MSG_CHECKING([whether to use libsndfile]) -if test $ac_cv_enable_libsndfile = yes; then +if test x$ac_cv_enable_libsndfile = xyes; then AC_MSG_RESULT(yes) - PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2,dnl - AC_DEFINE([HAVE_SNDFILE],1,[Set to 1 to enable libsndfile support.])dnl - CFLAGS="${CFLAGS} ${SNDFILE_CFLAGS}"dnl - LIBS="${LIBS} ${SNDFILE_LIBS}", ac_cv_enable_libsndfile=no) + PKG_CHECK_MODULES([SNDFILE], sndfile >= 1.0.2, :, ac_cv_enable_libsndfile=no) + if test x$ac_cv_enable_libsndfile = xyes; then + AC_DEFINE([HAVE_SNDFILE],1,[Set to 1 to enable libsndfile support.]) + fi else AC_MSG_RESULT(no) fi @@ -73,16 +68,19 @@ AC_ARG_ENABLE(ssl, [ --enable-ssl Enable SSL support using OpenSSL (default=yes)], [ac_cv_enable_ssl=$enableval], [ac_cv_enable_ssl=yes]) AC_MSG_CHECKING([whether to use OpenSSL]) -if test $ac_cv_enable_ssl = yes; then +if test x$ac_cv_enable_ssl = xyes; then AC_MSG_RESULT(yes) - PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.6,dnl - AC_DEFINE([HAVE_SSL],1,[Set to 1 to enable OpenSSL support.])dnl - CFLAGS="${CFLAGS} ${OPENSSL_CFLAGS}"dnl - LIBS="${LIBS} ${OPENSSL_LIBS}", ac_cv_enable_ssl=no) + PKG_CHECK_MODULES([OPENSSL], openssl >= 0.9.6, :, ac_cv_enable_ssl=no) + if test x$ac_cv_enable_ssl = xyes; then + AC_DEFINE([HAVE_SSL],1,[Set to 1 to enable OpenSSL support.]) + fi else AC_MSG_RESULT(no) fi +CFLAGS="${CFLAGS} ${SNDFILE_CFLAGS} ${OPENSSL_CFLAGS}" +LIBS="${SNDFILE_LIBS} ${OPENSSL_LIBS} ${LIBS}" + AC_SUBST(CFLAGS) AC_SUBST(LIBS) AC_SUBST(ac_aux_dir)