gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated (321c6b879 -> 50f8dfd7d)


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated (321c6b879 -> 50f8dfd7d)
Date: Mon, 13 May 2019 10:39:59 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository gnunet.

    from 321c6b879 use AS_CASE/AS_IF
     new a07103f6a use AS_CASE/AS_IF
     new 311cada8c use AS_CASE/AS_IF
     new 50f8dfd7d use AS_CASE/AS_IF

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac | 403 +++++++++++++++++++++++++----------------------------------
 1 file changed, 168 insertions(+), 235 deletions(-)

diff --git a/configure.ac b/configure.ac
index 815c015f3..b83e5267b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,8 +75,8 @@ OLD_LDFLAGS="$LDFLAGS"
 LDFLAGS="$LDFLAGS -Wl,--unresolved-symbols=report-all"
 
 # Check system type
-case "$host_os" in
-*darwin* | *rhapsody* | *macosx*)
+AS_CASE(["$host_os"],
+  [*darwin* | *rhapsody* | *macosx*],[
      AC_DEFINE_UNQUOTED(DARWIN,1,[This is an Apple Darwin system])
      CPPFLAGS="-D_APPLE_C_SOURCE $CPPFLAGS"
      CFLAGS="-fno-common $CFLAGS"
@@ -88,16 +88,16 @@ case "$host_os" in
      LIBPREFIX=
      DLLDIR=lib
      UNIXONLY="#"
-     ;;
-linux*)
+  ],
+  [linux*],[
      AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
      build_target="linux"
      LIBPREFIX=
      DLLDIR=lib
      UNIXONLY="#"
      AC_PATH_XTRA
-     ;;
-*freebsd*)
+  ],
+  [*freebsd*],[
      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
      AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
      CFLAGS="-D_THREAD_SAFE $CFLAGS"
@@ -105,8 +105,8 @@ linux*)
      LIBPREFIX=
      DLLDIR=lib
      UNIXONLY="#"
-     ;;
-*openbsd*)
+  ],
+  [*openbsd*],[
      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
      AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
      LIBS=`echo $LIBS | sed -e "s/-ldl//"`
@@ -114,15 +114,15 @@ linux*)
      LIBPREFIX=
      DLLDIR=lib
      UNIXONLY="#"
-     ;;
-*netbsd*)
+  ],
+  [*netbsd*],[
      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
      AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
      LIBPREFIX=
      DLLDIR=lib
      UNIXONLY="#"
-     ;;
-*solaris*)
+  ],
+  [*solaris*],[
      AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
      AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
      AC_CHECK_LIB(resolv, res_init)
@@ -131,16 +131,16 @@ linux*)
      LIBPREFIX=
      DLLDIR=lib
      UNIXONLY="#"
-     ;;
-*arm-linux*)
+  ],
+  [*arm-linux*],[
      AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
      CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS"
      build_target="linux"
      LIBPREFIX=
      DLLDIR=lib
      UNIXONLY="#"
-     ;;
-*cygwin*)
+  ],
+  [*cygwin*],[
      AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
      AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
      AC_CHECK_LIB(intl, gettext)
@@ -150,8 +150,8 @@ linux*)
      DLLDIR=bin
      AC_PROG_CXX
      UNIXONLY=""
-     ;;
-*mingw*)
+  ],
+  [*mingw*],[
      AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
      AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
      AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
@@ -167,18 +167,17 @@ linux*)
      UNIXONLY=""
      funcstocheck=""
      native_srcdir=$(cd $srcdir; pwd -W)
-     ;;
-gnu*)
+  ],
+  [gnu*],[
      AC_DEFINE_UNQUOTED(GNU,1,[This is a GNU system])
      build_target="gnu"
      UNIXONLY="#"
-     ;;
-*)
+  ],
+  [
      AC_MSG_RESULT(Unrecognised OS $host_os)
      AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
      UNIXONLY=""
-;;
-esac
+])
 AC_DEFINE_UNQUOTED([GNUNET_DEFAULT_INTERFACE], $DEFAULT_INTERFACE, [This 
should be the default choice for the name of the first network interface])
 AC_SUBST(DEFAULT_INTERFACE)
 
@@ -380,21 +379,21 @@ AC_ARG_ENABLE([texi2mdoc-generation],
     [texi2mdoc_generation=${enableval}],
     [texi2mdoc_generation=no])
 AC_MSG_RESULT($texi2mdoc_generation)
-if test "x$texi2mdoc_generation" = "xyes"
-then
-  if test "$texi2mdoc" = 0
-  then
-  AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.])
-  AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System])
-  AC_MSG_WARN([ERROR: package manager or from 
https://mandoc.bsd.lv/texi2mdoc/])
-  else
-  AM_CONDITIONAL([TEXI2MDOC_GENERATION],true)
-  AC_DEFINE([TEXI2MDOC_GENERATION],[1],[Building section 7 mdoc output])
-  fi
-else
+AS_IF([test "x$texi2mdoc_generation" = "xyes"], 
+ [
+  AS_IF([test "$texi2mdoc" = 0],
+   [
+    AC_MSG_WARN([ERROR: mdoc output currently requires texi2mdoc.])
+    AC_MSG_WARN([ERROR: texi2mdoc can be obtained via your Operating System])
+    AC_MSG_WARN([ERROR: package manager or from 
https://mandoc.bsd.lv/texi2mdoc/])
+   ],[
+    AM_CONDITIONAL([TEXI2MDOC_GENERATION],true)
+    AC_DEFINE([TEXI2MDOC_GENERATION],[1],[Building section 7 mdoc output])
+   ])
+ ],[
   AM_CONDITIONAL([TEXI2MDOC_GENERATION],false)
   AC_DEFINE([TEXI2MDOC_GENERATION],[0],[Not building section 7 mdoc output])
-fi
+ ])
 
 # should the build process be building only the documentation?
 AC_MSG_CHECKING(whether to build only documentation)
@@ -480,8 +479,8 @@ AS_IF([test ! "x$enable_poisoning" = "xno"],
   [enable_poisoning=0])
 AC_DEFINE_UNQUOTED([ENABLE_POISONING],[$enable_poisoning],[1 if freed memory 
should be poisoned, 0 otherwise])
 
-if test $build = $target
-then
+AS_IF([test $build = $target],
+[
 AC_MSG_CHECKING([for working HMAC])
 AC_LANG_PUSH(C)
 LIBS="$LIBS $LIBGCRYPT_LIBS"
@@ -548,22 +547,17 @@ AC_RUN_IFELSE(
   ],
   [AC_MSG_RESULT([cross compiling, test skipped])])
 AC_LANG_POP(C)
-fi     # $build = $target
+])     # $build = $target
 
 # check for bluetooth library
 bluetooth=0
 AC_CHECK_LIB(bluetooth, 
ba2str,[AC_CHECK_HEADER([bluetooth/bluetooth.h],bluetooth=1)])
-if test "$build_target" = "mingw"
-then
-  bluetooth=1
-fi
+AS_IF([test "$build_target" = "mingw"],
+ [bluetooth=1])
 AM_CONDITIONAL(HAVE_LIBBLUETOOTH, [test "$bluetooth" = 1])
-if test "$bluetooth" = 1
-then
-  AC_DEFINE([HAVE_LIBBLUETOOTH],[1],[Have bluetooth library])
-else
-  AC_DEFINE([HAVE_LIBBLUETOOTH],[0],[Lacking bluetooth library])
-fi
+AS_IF([test "$bluetooth" = 1],
+ [AC_DEFINE([HAVE_LIBBLUETOOTH],[1],[Have bluetooth library])],
+ [AC_DEFINE([HAVE_LIBBLUETOOTH],[0],[Lacking bluetooth library])])
 
 # check for zbar library
 zbar=0
@@ -571,23 +565,20 @@ AC_MSG_CHECKING(for libzbar)
 AC_ARG_WITH(zbar,
    [  --with-zbar=PFX    base of libzbar installation],
    [AC_MSG_RESULT([$with_zbar])
-    case $with_zbar in
-      no)
-        ;;
-      yes)
+    AS_CASE([$with_zbar],
+      [no],[],
+      [yes],[
         AC_CHECK_HEADERS(zbar.h,
           AC_CHECK_LIB([zbar], [zbar_processor_create],
             zbar=1))
-        ;;
-      *)
+       ],[
         LDFLAGS="-L$with_zbar/lib $LDFLAGS"
         CPPFLAGS="-I$with_zbar/include $CPPFLAGS"
         AC_CHECK_HEADERS(zbar.h,
           AC_CHECK_LIB([zbar], [zbar_processor_create],
             EXT_LIB_PATH="-L$with_zbar/lib $EXT_LIB_PATH"
             zbar=1))
-        ;;
-    esac
+       ])
    ],
    [AC_MSG_RESULT([--with-zbar not specified])
     AC_CHECK_HEADERS(zbar.h,
@@ -604,23 +595,20 @@ AC_MSG_CHECKING(for libjansson)
 AC_ARG_WITH(jansson,
    [  --with-jansson=PFX    base of libjansson installation],
    [AC_MSG_RESULT([$with_jansson])
-    case $with_jansson in
-      no)
-        ;;
-      yes)
+    AS_CASE([$with_jansson],
+      [no],[],
+      [yes],[
         AC_CHECK_HEADERS(jansson.h,
           AC_CHECK_LIB([jansson], [json_loads],
             jansson=1))
-        ;;
-      *)
+      ],[
         LDFLAGS="-L$with_jansson/lib $LDFLAGS"
         CPPFLAGS="-I$with_jansson/include $CPPFLAGS"
         AC_CHECK_HEADERS(jansson.h,
           AC_CHECK_LIB([jansson], [json_loads],
             EXT_LIB_PATH="-L$with_jansson/lib $EXT_LIB_PATH"
             jansson=1))
-        ;;
-    esac
+      ])
    ],
    [AC_MSG_RESULT([--with-jansson not specified])
     AC_CHECK_HEADERS(jansson.h,
@@ -693,27 +681,24 @@ PKG_CHECK_MODULES(
   [gst=0])
 
 # Pulse Audio
-if test "x$pulse" != "x1" -o "x$opus" != "x1" -o "x$ogg" != "x1"
-then
- if test "x$gst" != "x1"
- then
+AS_IF([test "x$pulse" != "x1" -o "x$opus" != "x1" -o "x$ogg" != "x1"],[
+ AS_IF([test "x$gst" != "x1"],[
   conversation_backend=none
   AM_CONDITIONAL(BUILD_PULSE_HELPERS, false)
   AM_CONDITIONAL(BUILD_GST_HELPERS, false)
   AM_CONDITIONAL(BUILD_EXPERIMENTAL_HELPERS, false)
- else
+ ],[
    conversation_backend=gst
    AM_CONDITIONAL(BUILD_PULSE_HELPERS, false)
    AM_CONDITIONAL(BUILD_GST_HELPERS, true)
    AM_CONDITIONAL(BUILD_EXPERIMENTAL_HELPERS, false)
- fi
-else
-
+ ])
+],[
  conversation_backend=pulse
  AM_CONDITIONAL(BUILD_PULSE_HELPERS, true)
  AM_CONDITIONAL(BUILD_GST_HELPERS, false)
  AM_CONDITIONAL(BUILD_EXPERIMENTAL_HELPERS, false)
-fi
+])
 
 # libgnurl
 LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0)
@@ -724,15 +709,14 @@ LIBS="$LIBGNURL $LIBCURL $LIBS"
 
 # libcurl-gnutls
 LIBCURL_CHECK_CONFIG(,7.34.0,[curl=true],[curl=false])
-if test "x$curl" = xtrue
-then
+AS_IF([test "x$curl" = xtrue],[
  AC_CHECK_HEADER([curl/curl.h],
   AC_CHECK_DECLS(CURLINFO_TLS_SESSION,[curl=true],[curl=false],[[#include 
<curl/curl.h>]]),
   [curl=false])
  # need libcurl-gnutls.so, everything else is not acceptable
  AC_CHECK_LIB([curl-gnutls],[curl_easy_getinfo],,[curl=false])
  # cURL must support CURLINFO_TLS_SESSION, version >= 7.34
-fi
+])
 
 # libcurl and libgnurl should be mutually exclusive
 AS_IF([test "$gnurl" = 1],
@@ -763,22 +747,22 @@ AC_CHECK_HEADERS([glpk.h],[glpk=true],[glpk=false])
 AC_CHECK_LIB([glpk],[glp_init_env],,[glpk=false])
 # GLPK must support atm MLP presolving, version >= 4.32
 AC_CHECK_MEMBERS(glp_iocp.presolve,,[glpk=false],[[#include <glpk.h>]])
-if test "x$glpk" = xfalse
-then
+AS_IF([test "x$glpk" = xfalse],
+[
        AM_CONDITIONAL(HAVE_LIBGLPK, false)
        AC_MSG_WARN([ERROR: GNUnet requires GLPK  >= 4.32])
-else
+],[
        AM_CONDITIONAL(HAVE_LIBGLPK, true)
        AC_DEFINE([HAVE_LIBGLPK],[1],[Have GLPK])
-fi
+])
 
 
 AC_CHECK_HEADERS([nss.h],[nss=true],[nss=false])
-if test x$nss = xfalse
-then
+AS_IF([test x$nss = xfalse],
+  [
        AM_CONDITIONAL(HAVE_GLIBCNSS, false)
        AC_MSG_WARN([No GNU libc nss header, will not build NSS plugin])
-else
+  ],[
        NSS_INCLUDES="
        #include <nss.h>
        "
@@ -787,7 +771,7 @@ else
                [AM_CONDITIONAL(HAVE_GLIBCNSS, false)
                 AC_MSG_WARN([No nss header fails to define NSS_STATUS_UNAVAIl, 
will not build NSS plugin])],
                [$NSS_INCLUDES])
-fi
+])
 
 
 
@@ -804,14 +788,14 @@ AC_ARG_ENABLE([taler-wallet],
    [taler_only=${enableval}],
    [taler_only=no])
 AC_MSG_RESULT($taler_only)
-if test "x$taler_only" = "xyes"
-then
+AS_IF([test "x$taler_only" = "xyes"],
+[
   AM_CONDITIONAL([TALER_ONLY],true)
   AC_DEFINE([TALER_WALLET_ONLY],[1],[Compiling for Taler wallet])
-else
+],[
   AM_CONDITIONAL([TALER_ONLY],false)
   AC_DEFINE([TALER_WALLET_ONLY],[0],[Canonical compilation])
-fi
+])
 
 # test for libextractor
 extractor=0
@@ -819,23 +803,20 @@ AC_MSG_CHECKING(for libextractor)
 AC_ARG_WITH(extractor,
    [  --with-extractor=PFX    base of libextractor installation],
    [AC_MSG_RESULT([$with_extractor])
-    case $with_extractor in
-      no)
-        ;;
-      yes)
+    AS_CASE([$with_extractor],
+      [no],[],
+      [yes],[
         AC_CHECK_HEADERS([extractor.h],
           AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
             extractor=1))
-        ;;
-      *)
+      ],[
         LDFLAGS="-L$with_extractor/lib $LDFLAGS"
         CPPFLAGS="-I$with_extractor/include $CPPFLAGS"
         AC_CHECK_HEADERS([extractor.h],
           AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
             EXT_LIB_PATH="-L$with_extractor/lib $EXT_LIB_PATH"
             extractor=1))
-        ;;
-    esac
+      ])
    ],
    [AC_MSG_RESULT([--with-extractor not specified])
     AC_CHECK_HEADERS([extractor.h],
@@ -844,18 +825,18 @@ AC_ARG_WITH(extractor,
 # restore LIBS
 LIBS=$SAVE_LIBS
 
-if test "$extractor" != 1
-then
+AS_IF([test "$extractor" != 1],
+ [
  AM_CONDITIONAL(HAVE_LIBEXTRACTOR, false)
  AC_DEFINE([HAVE_LIBEXTRACTOR],[0],[Lacking libextractor])
-else
+ ],[
  AM_CONDITIONAL(HAVE_LIBEXTRACTOR, true)
  AC_DEFINE([HAVE_LIBEXTRACTOR],[1],[Have libextractor])
-fi
+ ])
 
 
-if test "$taler_only" != yes
-then
+AS_IF([test "$taler_only" != yes],[
+
 
 # Check for libltdl header (#2999)
 ltdl=0
@@ -863,34 +844,31 @@ AC_MSG_CHECKING(for libltdl)
 AC_ARG_WITH(ltdl,
    [  --with-ltdl=PFX    base of libltdl installation],
    [AC_MSG_RESULT([$with_ltdl])
-    case $with_ltdl in
-      no)
-        ;;
-      yes)
+    AS_CASE([$with_ltdl],
+      [no],[],
+      [yes],[
         AC_CHECK_HEADERS(ltdl.h,
           AC_CHECK_LIB([ltdl], [lt_dlopenext],
             ltdl=1))
-        ;;
-      *)
+      ],[
         LDFLAGS="-L$with_ltdl/lib $LDFLAGS"
         CPPFLAGS="-I$with_ltdl/include $CPPFLAGS"
         AC_CHECK_HEADERS(ltdl.h,
           AC_CHECK_LIB([ltdl], [lt_dlopenext],
             EXT_LIB_PATH="-L$with_ltdl/lib $EXT_LIB_PATH"
             ltdl=1))
-        ;;
-    esac
+      ])
    ],
    [AC_MSG_RESULT([--with-ltdl not specified])
     AC_CHECK_HEADERS(ltdl.h,
      AC_CHECK_LIB([ltdl], [lt_dlopenext],
       ltdl=1))])
-if test x$ltdl = x1
-then
+AS_IF([test x$ltdl = x1],
+[
  AC_MSG_RESULT([libltdl found])
-else
+],[
  AC_MSG_ERROR([GNUnet requires libltdl (from GNU libtool), try installing 
libltdl-dev])
-fi
+])
 # restore LIBS
 LIBS=$SAVE_LIBS
 
@@ -1015,32 +993,33 @@ AC_CHECK_LIB(z, compress2,
 AC_SUBST(Z_CFLAGS)
 AC_SUBST(Z_LIBS)
 
-if test "$enable_shared" = "no"
-then
+AS_IF([test "$enable_shared" = "no"],
+[
  AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
-fi
-
+])
 
 
 # restore LIBS
 LIBS=$SAVE_LIBS
 
 
-fi
+# end of taler-only being false
+])
+
 
 # check for iconv
 AM_ICONV
 
 # test for libunistring
 gl_LIBUNISTRING
-if test $HAVE_LIBUNISTRING != yes; then
- AC_MSG_ERROR([GNUnet requires libunistring])
-fi
+AS_IF([test $HAVE_LIBUNISTRING != yes],
+ [AC_MSG_ERROR([GNUnet requires libunistring])])
+ 
 # under emscripten, $gl_libunistring_hexversion is undefined
 if test "$taler_only" != yes; then
-if test "x$gl_libunistring_hexversion" = "x" || test 
"$gl_libunistring_hexversion" -le 2305; then
- AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])
-fi
+
+AS_IF([test "x$gl_libunistring_hexversion" = "x" || test 
"$gl_libunistring_hexversion" -le 2305],
+  [AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])])
 fi
 AC_CHECK_HEADERS([unistr.h],,AC_MSG_ERROR([Compiling GNUnet requires unistr.h 
(from libunistring) to be installed]))
 
@@ -1083,14 +1062,12 @@ AC_MSG_CHECKING(for SQLite)
 AC_ARG_WITH(sqlite,
   [  --with-sqlite=PFX       base of SQLite installation],
   [AC_MSG_RESULT("$with_sqlite")
-   case $with_sqlite in
-   no)
-     ;;
-   yes)
-    AC_CHECK_HEADERS(sqlite3.h,
-     sqlite=true)
-     ;;
-   *)
+   AS_CASE([$with_sqlite],
+     [no],[],
+     [yes],[
+      AC_CHECK_HEADERS(sqlite3.h,
+      sqlite=true)],
+     [
     LDFLAGS="-L$with_sqlite/lib $LDFLAGS"
     CPPFLAGS="-I$with_sqlite/include $CPPFLAGS"
     AC_CHECK_HEADERS(sqlite3.h,
@@ -1100,8 +1077,7 @@ AC_ARG_WITH(sqlite,
      sqlite=true)
     LDFLAGS=$SAVE_LDFLAGS
     CPPFLAGS=$SAVE_CPPFLAGS
-    ;;
-   esac
+    ])
   ],
   [AC_MSG_RESULT([--with-sqlite not specified])
     AC_CHECK_HEADERS(sqlite3.h, sqlite=true)])
@@ -1132,10 +1108,8 @@ CPPFLAGS=$SAVE_CPPFLAGS
 AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
 AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
 
-if test "$build_target" = "mingw"
-then
-  CYGWIN_MYSQL_MAGIC="#include <mysql/my_global.h>"
-fi
+AS_IF([test "$build_target" = "mingw"]
+ [CYGWIN_MYSQL_MAGIC="#include <mysql/my_global.h>"])
 
 # test for mysql
 mysql=false
@@ -1146,16 +1120,13 @@ AC_MSG_CHECKING(for mysql)
 AC_ARG_WITH(mysql,
   [  --with-mysql=PFX        base of MySQL installation],
   [AC_MSG_RESULT([$with_mysql])
-   case $with_mysql in
-   no)
-      ;;
-   yes|"")
+   AS_CASE([$with_mysql],
+     [no],[],
+     [yes|""],[
       AC_CHECK_HEADERS(mysql/mysql.h,
        AC_CHECK_LIB(mysqlclient, mysql_init,
-
        mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
-      ;;
-   *)
+     ],[
       LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS $ZLIBS"
       CPPFLAGS="-I$with_mysql/include $CPPFLAGS"
       AC_CHECK_HEADERS(mysql/mysql.h,
@@ -1164,8 +1135,7 @@ AC_ARG_WITH(mysql,
         MYSQL_CPPFLAGS="-I$with_mysql/include"
 
         mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
-      ;;
-   esac
+     ])
   ],
   [AC_MSG_RESULT([--with-mysql not specified])
    if test -d "/usr/lib64/mysql"; then
@@ -1189,8 +1159,8 @@ AC_SUBST(MYSQL_CPPFLAGS)
 
 # additional version check for mysql
 AC_ARG_ENABLE(mysql-version-check, [  --disable-mysql-version-check  do not 
check MySQL version],, enable_mysql_version_check=yes)
-if test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"
-then
+AS_IF([test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"],
+ [
   AC_MSG_CHECKING(mysql version)
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
     [[$CYGWIN_MYSQL_MAGIC
@@ -1202,14 +1172,14 @@ then
       int main () { return 0; }
     ]])
     ],mysql=true,mysql=false)
-  if test "$mysql" = "false"
-  then
+  AS_IF([test "$mysql" = "false"],
+   [
     mysqlfail=true
     AC_MSG_RESULT([fail, >= 4.1 required])
-  else
+   ],[
     AC_MSG_RESULT(ok)
-  fi
-fi
+   ])
+])
 AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)
 AM_CONDITIONAL(HAVE_MYSQLE, false)
 # restore LIBS
@@ -1217,10 +1187,10 @@ LIBS=$SAVE_LIBS
 LDFLAGS=$SAVE_LDFLAGS
 CPPFLAGS=$SAVE_CPPFLAGS
 
-if test "$sqlite" = 0 -a "$mysql" = 0
-then
+AS_IF([test "$sqlite" = 0 -a "$mysql" = 0],
+[
  AC_MSG_ERROR([GNUnet requires SQLite or MySQL])
-fi
+])
 
 # libmicrohttpd
 lmhd=0
@@ -1228,10 +1198,9 @@ AC_MSG_CHECKING([for libmicrohttpd])
 AC_ARG_WITH(microhttpd,
    [  --with-microhttpd=PFX   base of libmicrohttpd installation],
    [AC_MSG_RESULT([$with_microhttpd])
-    case $with_microhttpd in
-      no)
-        ;;
-      yes|"")
+    AS_CASE([$with_microhttpd],
+      [no],[],
+      [yes|""],[
         AC_CHECK_HEADERS([microhttpd.h],
          AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
             AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
@@ -1250,8 +1219,7 @@ AC_ARG_WITH(microhttpd,
            [],[#include "$native_srcdir/src/include/platform.h"
                 #include <microhttpd.h>]),,
             [#include "$native_srcdir/src/include/platform.h"])
-        ;;
-      *)
+      ],[
         LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
         CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"
         AC_CHECK_HEADERS(microhttpd.h,
@@ -1273,8 +1241,7 @@ AC_ARG_WITH(microhttpd,
            [],[#include "$native_srcdir/src/include/platform.h"
                 #include <microhttpd.h>]),,
             [#include "$native_srcdir/src/include/platform.h"])
-        ;;
-    esac
+       ])
    ],
    [AC_MSG_RESULT([--with-microhttpd not specified])
     AC_CHECK_HEADERS([microhttpd.h],
@@ -1361,13 +1328,13 @@ GN_INTLINCL=""
 GN_LIBINTL="$LTLIBINTL"
 AC_ARG_ENABLE(framework, [  --enable-framework      enable Mac OS X framework 
build helpers],enable_framework_build=$enableval)
 AM_CONDITIONAL(WANT_FRAMEWORK, test x$enable_framework_build = xyes)
-if test x$enable_framework_build = xyes
-then
+AS_IF([test x$enable_framework_build = xyes],
+[
   AC_DEFINE([FRAMEWORK_BUILD], 1, [Build a Mac OS X Framework])
   GN_INTLINCL='-I$(top_srcdir)/src/intlemu'
   GN_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework 
CoreFoundation'
   AC_LIB_APPENDTOVAR([CPPFLAGS], [$GN_INTLINCL])
-fi
+])
 
 GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
 GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
@@ -1396,17 +1363,10 @@ AC_MSG_CHECKING(for sudo)
 AC_ARG_WITH(sudo,
   [  --with-sudo=PATH       path to sudo binary (or just yes)],
   [AC_MSG_RESULT("$with_sudo")
-   case $with_sudo in
-   no)
-     SUDO_BINARY=
-     ;;
-   yes)
-     SUDO_BINARY=sudo
-     ;;
-   *)
-     SUDO_BINARY=$with_sudo
-    ;;
-   esac
+   AS_CASE([$with_sudo],
+   [no],[SUDO_BINARY=],
+   [yes],[SUDO_BINARY=sudo],
+   [SUDO_BINARY=$with_sudo])
   ],
   [AC_MSG_RESULT([no])])
 AC_SUBST(SUDO_BINARY)
@@ -1419,17 +1379,10 @@ AC_MSG_CHECKING(for gnunetdns group name)
 AC_ARG_WITH(gnunetdns,
   [  --with-gnunetdns=GRPNAME       name for gnunetdns group],
   [AC_MSG_RESULT("$with_gnunetdns")
-   case $with_gnunetdns in
-   no)
-     GNUNETDNS_GROUP=gnunet
-     ;;
-   yes)
-     GNUNETDNS_GROUP=gnunetdns
-     ;;
-   *)
-     GNUNETDNS_GROUP=$with_gnunetdns
-    ;;
-   esac
+   AS_CASE([$with_gnunetdns],
+     [no],[GNUNETDNS_GROUP=gnunet],
+     [yes],[GNUNETDNS_GROUP=gnunetdns],
+     [GNUNETDNS_GROUP=$with_gnunetdns])
   ],
   [AC_MSG_RESULT([gnunetdns])])
 AC_SUBST(GNUNETDNS_GROUP)
@@ -1443,18 +1396,16 @@ AC_MSG_CHECKING(for gnutls)
 AC_ARG_WITH(gnutls,
    [  --with-gnutls=PFX   base of gnutls installation],
    [AC_MSG_RESULT([$with_gnutls])
-    case $with_gnutls in
-      no)
-        ;;
-      yes)
+    AS_CASE([$with_gnutls],
+      [no],[],
+      [yes],[
         AC_CHECK_HEADERS([gnutls/abstract.h],
             AC_CHECK_LIB([gnutls], [gnutls_priority_set],
             gnutls=true))
         AC_CHECK_HEADERS([gnutls/dane.h],
             AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw],
              gnutls_dane=1))
-        ;;
-      *)
+      ],[
         LDFLAGS="-L$with_gnutls/lib $LDFLAGS"
         CPPFLAGS="-I$with_gnutls/include $CPPFLAGS"
         AC_CHECK_HEADERS([gnutls/abstract.h],
@@ -1464,8 +1415,7 @@ AC_ARG_WITH(gnutls,
         AC_CHECK_HEADERS([gnutls/dane.h],
             AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw],
              gnutls_dane=1))
-        ;;
-    esac
+      ])
    ],
    [AC_MSG_RESULT([--with-gnutls not specified])
     AC_CHECK_HEADERS([gnutls/abstract.h],
@@ -1487,12 +1437,9 @@ AC_MSG_CHECKING(if GNUnet is being configured to run on 
the SuperMUC)
 AC_ARG_ENABLE([supermuc],
     [AS_HELP_STRING([--enable-supermuc],
        [build GNUnet with support to run on the SuperMUC (default is NO)])],
-    [if test "x$enable_supermuc" = "xno"
-     then
-       supermuc=0
-     else
-       supermuc=1
-     fi],
+    [AS_IF([test "x$enable_supermuc" = "xno"],
+      [supermuc=0],
+      [supermuc=1])],
     [supermuc=0
      enable_supermuc=no])
 AC_MSG_RESULT($enable_SUPERMUC)
@@ -1507,12 +1454,9 @@ AC_ARG_ENABLE([nse-histogram],
        [have NSE send timestamp information to testbed logger for generating
        histogram of received messages.  NOT useful for production (default is
        NO)])],
-    [if test "x$enableval" = "xno"
-     then
-       nse_histogram=0
-     else
-       nse_histogram=1
-     fi],
+    [AS_IF([test "x$enableval" = "xno"],
+      [nse_histogram=0],
+      [nse_histogram=1])],
     [nse_histogram=0
      enable_nse_histogram=no])
 AC_MSG_RESULT($enable_nse_histogram)
@@ -1557,12 +1501,9 @@ AC_ARG_ENABLE([javaports],
    [enable_java_ports=${enableval}],
    [enable_java_ports=no])
 AC_MSG_RESULT($enable_java_ports)
-if test "x$enable_java_ports" = "xyes"
-then
-  JAVAPORT=""
-else
-  JAVAPORT="$UNIXONLY"
-fi
+AS_IF([test "x$enable_java_ports" = "xyes"],
+ [JAVAPORT=""],
+ [JAVAPORT="$UNIXONLY"])
 AC_SUBST(JAVAPORT)
 
 # should benchmarks be run?
@@ -1596,12 +1537,9 @@ AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test 
"x$enable_experimental" = "xyes"])
 AC_MSG_CHECKING(whether to compile malicious code)
 AC_ARG_ENABLE([malicious],
    [AS_HELP_STRING([--enable-malicious], [enable compiling malicious code])],
-   [if test "x$enableval" = "xno"
-     then
-       malicious=0
-     else
-       malicious=1
-     fi],
+   [AS_IF([test "x$enableval" = "xno"],
+     [malicious=0],
+     [malicious=1])],
    [malicious=0
     enable_malicious=no])
 AC_MSG_RESULT($enable_malicious)
@@ -1619,10 +1557,8 @@ AC_MSG_CHECKING(whether to start peer's services on 
demand by default)
 AC_ARG_ENABLE([autostart],
    [AS_HELP_STRING([--disable-autostart], [do not start peer's services by 
default])],
    [enable_autostart=${enableval}
-    if test "x$enable_autostart" = "xno"
-    then
-        START_ON_DEMAND="NO"
-    fi
+    AS_IF([test "x$enable_autostart" = "xno"],
+      [START_ON_DEMAND="NO"])
    ],
    [enable_autostart=yes])
 AC_MSG_RESULT($enable_autostart)
@@ -1740,12 +1676,9 @@ else
      [enable_workarounds=${enableval}],
      [enable_workarounds=no])
   AC_MSG_RESULT($enable_workarounds)
-  if test x$enable_windows_workarounds = "xyes"
-  then
-     workarounds=1
-  else
-     workarounds=0
-   fi
+  AS_IF([test x$enable_windows_workarounds = "xyes"],
+    [workarounds=1],
+    [workarounds=0])
 fi
 AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable 
workarounds used on Windows (only useful for test cases)])
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]