dnl it under the terms of the GNU Library General Public License as
dnl published by the Free Software Foundation; either version 2 of the
dnl License, or (at your option) any later version.
-dnl
+dnl
dnl Catacomb is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU Library General Public License for more details.
-dnl
+dnl
dnl You should have received a copy of the GNU Library General Public
dnl License along with Catacomb; if not, write to the Free
dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
dnl --- Boring boilerplate ---
AC_INIT(blkc.h)
-mdw_INIT_LIB(catacomb, Catacomb, 2.1.0)
+AM_INIT_AUTOMAKE(catacomb, 2.1.1)
AM_CONFIG_HEADER(config.h)
dnl --- Make sure I can compile and build libraries ---
AC_PROG_CC
AM_PROG_LIBTOOL
-mdw_GCC_FLAGS
+AX_CFLAGS_WARN_ALL
AC_PROG_YACC
dnl --- Check for various important system types ---
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
+AC_CHECK_TYPE(pid_t, int)
+AC_CHECK_TYPE(size_t, unsigned)
AC_TYPE_UID_T
AC_CHECK_TYPE(time_t, long)
-mdw_TYPE_SSIZE_T
+AC_CHECK_TYPE(ssize_t, int)
dnl --- The maths library, for Maurer's test ---
-mdw_CHECK_MANYLIBS(log, m,,, [#include <math.h>], [2])
-mdw_CHECK_MANYLIBS(sqrt, m,,, [#include <math.h>], [2])
+OLIBS=$LIBS
+AC_SEARCH_LIBS(log, m)
+AC_SEARCH_LIBS(sqrt, m)
+AC_SUBST([CATACOMB_LIBS], [$LIBS]) LIBS=$OLIBS
dnl --- Functions used for noise-gathering ---
[catacomb_cv_freewheel=no])])
if test "$catacomb_cv_freewheel" = "yes"; then
AC_DEFINE([USE_FREEWHEEL], [1],
- [Define if you want to use the freewheel noise generator.])
+ [Define if you want to use the freewheel noise generator.])
fi
dnl --- Support for the passphrase pixie ---
-mdw_CHECK_MANYLIBS(socket, socket)
+OLIBS=$LIBS
+AC_SEARCH_LIBS(socket, socket)
+AC_SUBST([PIXIE_LIBS], [$LIBS]) LIBS=$OLIBS
AC_CHECK_FUNCS(mlock)
dnl --- Debugging things ---
-AC_ARG_ENABLE([mpw],
- [AS_HELP_STRING([--enable-mpw],
- [force small-width mp digits])],
- [case "$enableval" in
- y*|t*|short)
- AC_DEFINE([FORCE_MPW_SHORT], [1],
- [Define to force small-width mp digits.])
- ;;
- cussid)
- AC_DEFINE([FORCE_MPW_CUSSID], [1],
- [Define to force strange-width mp digits.])
- ;;
- esac])
+AC_ARG_ENABLE([mpw],
+ [AS_HELP_STRING([--enable-mpw],
+ [force small-width mp digits])],
+ [case "$enableval" in
+ y*|t*|short)
+ AC_DEFINE([FORCE_MPW_SHORT], [1],
+ [Define to force small-width mp digits.])
+ ;;
+ cussid)
+ AC_DEFINE([FORCE_MPW_CUSSID], [1],
+ [Define to force strange-width mp digits.])
+ ;;
+ esac])
dnl --- Done ---
-mdw_MLIB(2.0.0)
-AC_OUTPUT(Makefile tests/Makefile catacomb-config:lib-config.in qcc,
+PKG_CHECK_MODULES(mLib, mLib >= 2.0.4)
+CFLAGS="$CFLAGS $mLib_CFLAGS"
+LIBS="$LIBS $mLib_LIBS"
+AC_OUTPUT(Makefile tests/Makefile catacomb.pc qcc,
chmod 755 qcc)
dnl ----- That's all, folks -------------------------------------------------