X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;ds=sidebyside;f=configure.ac;h=faff915874a40e697d785a1e6107d8fc8690206f;hb=ee3242c4b065b97df2b8c692a7e2b5eb11c95b7e;hp=4062197cf01f6ea4e131a1140c37b018a470c75d;hpb=9204951c2ba2bd25f2dbb7ae35ec92348fe8176a;p=dockapps%2Fwmnotify.git diff --git a/configure.ac b/configure.ac index 4062197..faff915 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.1) -AC_CONFIG_AUX_DIR(config) +AC_INIT(wmnotify, 1.0.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 +AM_PROG_CC_C_O 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)