# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([libbrandt], [0.1], [teichm@net.in.tum.de]) AM_INIT_AUTOMAKE([1.15]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_SRCDIR([brandt.c]) #AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CC_C99 LT_INIT([pic-only]) # fix std CC=$(echo "${CC}" | sed 's/-std=gnu99/-std=c99/') CPP=$(echo "${CPP}" | sed 's/-std=gnu99/-std=c99/') # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T AC_TYPE_UINT16_T # Checks for libraries. AC_SEARCH_LIBS([gcry_check_version], [gcrypt], [], [AC_MSG_ERROR([unable to find the gcry_check_version() function from libgcrypt])]) # Checks for header files. AC_CHECK_HEADER(gcrypt.h, [], [AC_MSG_ERROR([unable to find the gcrypt.h header file from libgcrypt])], []) SAVE_LIBS=$LIBS libgnunetutil=0 AC_MSG_CHECKING([for libgnunetutil]) AC_ARG_WITH(gnunet, [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])], [AC_MSG_RESULT([given as $with_gnunet])], [AC_MSG_RESULT(not given) with_gnunet=yes]) AS_CASE([$with_gnunet], [yes], [], [no], [AC_MSG_ERROR([--with-gnunet is required])], [LDFLAGS="-L$with_gnunet/lib $LDFLAGS" CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"]) AC_CHECK_HEADERS([gnunet/platform.h gnunet/gnunet_util_lib.h], [AC_CHECK_LIB([gnunetutil], [GNUNET_SCHEDULER_run], libgnunetutil=1)], [], [#ifdef HAVE_GNUNET_PLATFORM_H #include #endif]) AS_IF([test $libgnunetutil != 1], [AC_MSG_ERROR([[ *** *** You need libgnunetutil to build this program. *** This library is part of GNUnet, available at *** https://gnunet.org *** ]])]) # restore LIBS LIBS=$SAVE_LIBS AC_CONFIG_FILES([ Makefile doc/Makefile ]) AC_OUTPUT