frosix

Multiparty signature service (experimental)
Log | Files | Refs | README | LICENSE

configure.ac (2719B)


      1 #                                               -*- Autoconf -*-
      2 # Process this file with autoconf to produce a configure script.
      3 
      4 AC_PREREQ([2.69])
      5 AC_INIT([frosix], [0.0.1], [joeltobias.urech@students.bfh.ch])
      6 AC_CONFIG_HEADERS([frosix_config.h])
      7 
      8 # Checks for programs.
      9 AM_INIT_AUTOMAKE([subdir-objects 1.9 tar-pax])
     10 # pretty build rules
     11 AM_SILENT_RULES([yes])
     12 
     13 AC_CONFIG_MACRO_DIR([m4])
     14 
     15 AC_PROG_AWK
     16 AC_PROG_CC
     17 AC_PROG_OBJC
     18 AC_PROG_INSTALL
     19 AC_PROG_LN_S
     20 AC_PROG_MAKE_SET
     21 AM_PROG_CC_C_O
     22 
     23 LT_INIT([disable-static dlopen])
     24 
     25 CFLAGS="-Wall $CFLAGS"
     26 
     27 # Checks for libraries.
     28 
     29 # check for libsodium version >= 1.0.18 - from gnunet
     30 libsodium=0
     31 AC_CHECK_HEADER([sodium.h],
     32   [AC_CHECK_LIB([sodium], [crypto_core_ed25519_scalar_mul],
     33                 [libsodium=1],
     34                 [libsodium=0])])
     35 
     36 AS_IF([test "x$libsodium" = "x0"],
     37       [AC_MSG_ERROR([GNUnet requires libsodium >= 1.0.18])])
     38 
     39 # Check for GNUnet's libgnunetutil. - from anastasis
     40 libgnunetutil=0
     41 AC_MSG_CHECKING([for libgnunetutil])
     42 AC_ARG_WITH(gnunet,
     43             [AS_HELP_STRING([--with-gnunet=PFX], [base of GNUnet installation])],
     44             [AC_MSG_RESULT([given as $with_gnunet])],
     45             [AC_MSG_RESULT(not given)
     46              with_gnunet=yes])
     47 AS_CASE([$with_gnunet],
     48         [yes], [],
     49         [no], [AC_MSG_ERROR([--with-gnunet is required])],
     50         [LDFLAGS="-L$with_gnunet/lib $LDFLAGS"
     51          CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"])
     52 AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h],
     53  [AC_CHECK_LIB([gnunetutil],
     54                [GNUNET_SCHEDULER_run],
     55                [libgnunetutil=1])])
     56 AS_IF([test $libgnunetutil != 1],
     57   [AC_MSG_ERROR([[
     58 ***
     59 *** You need libgnunetutil to build this program.
     60 *** This library is part of GNUnet, available at
     61 ***   https://gnunet.org
     62 *** ]])])
     63 
     64 # Checks for header files.
     65 AC_CHECK_HEADERS([string.h stdio.h time.h])
     66 
     67 # Checks for typedefs, structures, and compiler characteristics.
     68 AC_TYPE_SIZE_T
     69 AC_TYPE_UINT32_T
     70 AC_TYPE_UINT8_T
     71 
     72 # Checks for library functions.
     73 AC_CHECK_FUNCS([memset])
     74 
     75 AC_CONFIG_FILES([Makefile
     76                  contrib/Makefile
     77                  doc/Makefile
     78                  doc/doxygen/Makefile
     79                  src/Makefile
     80                  src/authorization/Makefile
     81                  src/backend/Makefile
     82                  src/cli/Makefile
     83                  src/frosixdb/Makefile
     84                  src/include/Makefile
     85                  src/libfrostdistkeygen/Makefile
     86                  src/libfrosthigh/Makefile
     87                  src/libfrostlow/Makefile
     88                  src/libfrosttrusteddealer/Makefile
     89                  src/libfrostverify/Makefile
     90                  src/libfrosix/Makefile
     91                  src/restclient/Makefile
     92                  src/util/Makefile])
     93 AC_OUTPUT