AM_INIT_AUTOMAKE(check-news)
dnl Testing the C compiler.
-AC_PROG_CC
+dnl AC_PROG_CC
+AM_PROG_CC_C_O
AC_LANG_C
dnl Checking for header files.
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(CC="${PTHREAD_CC}", , echo "Can't find POSIX threads library"; exit 1 )
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} ${PTHREAD_CFLAGS} ${SNDFILE_CFLAGS} ${OPENSSL_CFLAGS}"
+LIBS="${PTHREAD_LIBS} ${SNDFILE_LIBS} ${OPENSSL_LIBS} ${LIBS}"
+
AC_SUBST(CFLAGS)
AC_SUBST(LIBS)
AC_SUBST(ac_aux_dir)