-# 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
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
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
[ --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
[ --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)