libbrandt/configure.ac

72 lines
2.0 KiB
Plaintext
Raw Normal View History

2016-06-01 01:08:43 +02:00
# -*- 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])
AC_CONFIG_SRCDIR([brandt.c])
2016-06-01 01:08:43 +02:00
#AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC_C99
LT_INIT([pic-only])
2016-06-01 01:08:43 +02:00
# fix std
CC=$(echo "${CC}" | sed 's/-std=gnu99/-std=c99/')
CPP=$(echo "${CC}" | sed 's/-std=gnu99/-std=c99/')
2016-06-01 01:08:43 +02:00
# Checks for libraries.
2016-06-28 22:11:18 +02:00
AC_SEARCH_LIBS([gcry_check_version], [gcrypt], [], [AC_MSG_ERROR([unable to find the gcry_check_version() function from libgcrypt])])
2016-06-01 01:08:43 +02:00
# Checks for header files.
2016-06-28 22:11:18 +02:00
AC_CHECK_HEADER(gcrypt.h, [], [AC_MSG_ERROR([unable to find the gcrypt.h header file from libgcrypt])], [])
2016-06-01 01:08:43 +02:00
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
SAVE_LIBS=$LIBS
gnunetutil=0
AC_MSG_CHECKING(for libgnunetutil)
AC_ARG_WITH(gnunetutil,
[ --with-gnunetutil=PFX base of libgnunetutil installation],
[AC_MSG_RESULT([$with_gnunetutil])
case $with_gnunetutil in
no)
;;
yes)
AC_CHECK_HEADERS(gnunet/gnunet_util_lib.h,
AC_CHECK_LIB([gnunetutil], [GNUNET_CRYPTO_ecc_dlog],
gnunetutil=1))
;;
*)
LDFLAGS="-L$with_gnunetutil/lib $LDFLAGS"
CPPFLAGS="-I$with_gnunetutil/include $CPPFLAGS"
AC_CHECK_HEADERS(gnunet/gnunet_util_lib.h,
AC_CHECK_LIB([gnunetutil], [GNUNET_CRYPTO_ecc_dlog],
EXT_LIB_PATH="-L$with_gnunetutil/lib $EXT_LIB_PATH"
gnunetutil=1))
;;
esac
],
[AC_MSG_RESULT([--with-gnunetutil not specified])
AC_CHECK_HEADERS(gnunet/gnunet_util_lib.h,
AC_CHECK_LIB([gnunetutil], [GNUNET_CRYPTO_ecc_dlog],
gnunetutil=1))])
if test x$gnunetutil = x1
then
AC_MSG_RESULT([libgnunetutil found])
else
AC_MSG_ERROR([libbrandt requires libgnunetutil])
fi
# restore LIBS
LIBS=$SAVE_LIBS
2016-06-01 01:08:43 +02:00
2016-06-12 00:26:05 +02:00
AC_CONFIG_FILES([
Makefile
doc/Makefile
])
2016-06-01 01:08:43 +02:00
AC_OUTPUT