gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet-gtk] branch master updated (adefa45d -> 9a394776)


From: gnunet
Subject: [GNUnet-SVN] [gnunet-gtk] branch master updated (adefa45d -> 9a394776)
Date: Mon, 13 May 2019 10:52:02 +0200

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

grothoff pushed a change to branch master
in repository gnunet-gtk.

    from adefa45d add it
     new ba59b0d0 use AS_CASE/AS_IF
     new 9a394776 use AS_CASE/AS_IF

The 2 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 | 184 +++++++++++++++++++++++++----------------------------------
 1 file changed, 77 insertions(+), 107 deletions(-)

diff --git a/configure.ac b/configure.ac
index 11bf63ea..fd752bec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,53 +50,51 @@ AC_TYPE_UID_T
 
 CFLAGS="-Wall $CFLAGS"
 # use '-fno-strict-aliasing', but only if the compiler can take it
-if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
-then
- CFLAGS="-fno-strict-aliasing $CFLAGS"
-fi
+AS_IF([gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1],
+ [CFLAGS="-fno-strict-aliasing $CFLAGS"])
 
 # Default to unix configuration
 ENABLE_ON_UNIX=""
 ENABLE_ON_W32="#"
 # Check system type
-case "$host_os" in
-*darwin* | *rhapsody* | *macosx*)
+AS_CASE(["$host_os"],
+  [*darwin* | *rhapsody* | *macosx*],[
      AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
      CFLAGS="-no-cpp-precomp $CFLAGS"
      LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS"
-     ;;
-linux*)
+  ],
+  [linux*],[
      AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
-     ;;
-freebsd*)
+  ],
+  [freebsd*],[
      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
      AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
-     ;;
-openbsd*)
+  ],
+  [openbsd*],[
      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
      AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
-     ;;
-netbsd*)
+  ],
+  [netbsd*],[
      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
      AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
-     ;;
-*solaris*)
+  ],
+  [*solaris*],[
      AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
      AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
      build_target="solaris"
-     ;;
-*arm-linux*)
+  ],
+  [*arm-linux*],[
      AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
-     ;;
-*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)
      ENABLE_ON_W32=""
      ENABLE_ON_UNIX="#"
      build_target="cygwin"
-     ;;
-*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])
@@ -107,12 +105,11 @@ netbsd*)
      ENABLE_ON_W32=""
      ENABLE_ON_UNIX="#"
      build_target="mingw"
-     ;;
-*)
+   ],
+   [
      AC_MSG_RESULT(Unrecognised OS $host_os)
      AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
-;;
-esac
+   ])
 
 AM_CONDITIONAL(MINGW,   test "$build_target" = "mingw")
 
@@ -173,23 +170,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,
@@ -198,14 +192,14 @@ 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
+])
 
 
 # test for libqrencode
@@ -215,28 +209,26 @@ AC_MSG_CHECKING(for libqrencode)
 AC_ARG_WITH(qrencode,
    [  --with-qrencode=PFX    Base of libqrencode installation],
    [AC_MSG_RESULT([$with_qrencode])
-    case $with_qrencode in
-      no)
-        ;;
-      yes)
+    AS_CASE([$with_qrencode],
+      [no],[],
+      [yes],[
         AC_CHECK_HEADERS(qrencode.h,qrencode=1)
-        ;;
-      *)
+      ],
+      [
         CPPFLAGS="-I$with_qrencode/include $CPPFLAGS"
         QR_CFLAGS="-I$with_qrencode/include"
         QR_LIBS="-L$with_qrencode/lib -lqrencode"
         AC_CHECK_HEADERS(qrencode.h,qrencode=1)
-        ;;
-    esac
+      ])
    ],
    [AC_MSG_RESULT([--with-qrencode not specified])
     AC_CHECK_HEADERS(qrencode.h,qrencode=1)])
 
-if test "$qrencode" != 1
-then
+AS_IF([test "$qrencode" != 1],
+[
 QR_LIBS=""
 QR_CFLAGS=""
-fi
+])
 
 AC_SUBST(QR_CFLAGS)
 AC_SUBST(QR_LIBS)
@@ -251,9 +243,10 @@ AM_PATH_GTK_3_0([3.22.0],,AC_MSG_ERROR([gnunet-gtk 
requires GTK 3.22]))
 # test for libunique
 AC_ARG_WITH([libunique], AC_HELP_STRING([--without-libunique], [disable 
libunique]))
 have_libunique=no
-if test x$with_libunique != xno; then
+AS_IF([test x$with_libunique != xno],
+[
   PKG_CHECK_MODULES([unique], [unique-3.0], AC_DEFINE(HAVE_LIBUNIQUE, 1, 
[Define if libunique is available]), AC_MSG_WARN([libunique would be nice to 
have]))
-fi
+])
 
 CFLAGS="$CFLAGS $GTK_CFLAGS"
 CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
@@ -271,17 +264,10 @@ AC_MSG_CHECKING(for Glade core)
 AC_ARG_WITH(glade,
    [  --with-glade=PFX       Base of Glade installation (found with pkg-config 
if omitted)],
    [AC_MSG_RESULT([$with_glade])
-    case $with_glade in
-      no)
-        lookin=""
-        ;;
-      yes)
-        lookin="${prefix}"
-        ;;
-      *)
-        lookin="$with_glade"
-        ;;
-    esac
+    AS_CASE([$with_glade],
+      [no],[lookin=""],
+      [yes],[lookin="${prefix}"],
+      [lookin="$with_glade"])
    ],
    [
      AC_MSG_RESULT([--with-glade not specified])
@@ -289,8 +275,8 @@ AC_ARG_WITH(glade,
    ]
 )
 
-if test "x$glade" = "x0" -a ! "x$lookin" = "x"
-then
+AS_IF([test "x$glade" = "x0" -a ! "x$lookin" = "x"],
+[
   AC_MSG_CHECKING(for Glade3 in $lookin)
   backup_LIBS="$LIBS"
   backup_CFLAGS="$CFLAGS"
@@ -305,19 +291,16 @@ then
       AC_CHECK_LIB([gladeui-2], [glade_xml_node_new],
         glade=2)
     )
-  if test ! "x$glade" = "x0"
-  then
+  AS_IF([test ! "x$glade" = "x0"],[
     EXT_LIB_PATH="-L${lookin}/lib $EXT_LIB_PATH"
-  fi
+  ])
   LIBS="$backup_LIBS"
   CFLAGS="$backup_CFLAGS"
   CPPFLAGS="$backup_CPPFLAGS"
-fi
+])
 
-if test "x$glade" = "x0"
-then
-  AC_MSG_ERROR([gnunet-gtk requires Glade3 (library and headers)])
-fi
+AS_IF([test "x$glade" = "x0"],
+ [AC_MSG_ERROR([gnunet-gtk requires Glade3 (library and headers)])])
 
 AC_SUBST(GLADE_CFLAGS)
 AC_SUBST(GLADE_LIBS)
@@ -330,23 +313,20 @@ 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_pubkey_import],
             gnutls=1))
-        ;;
-      *)
+      ],[
         LDFLAGS="-L$with_gnutls/lib $LDFLAGS"
         CPPFLAGS="-I$with_gnutls/include $CPPFLAGS"
         AC_CHECK_HEADERS([gnutls/abstract.h],
             AC_CHECK_LIB([gnutls], [gnutls_pubkey_import],
               EXT_LIB_PATH="-L$with_gnutls/lib $EXT_LIB_PATH"
               gnutls=1))
-        ;;
-    esac
+      ])
    ],
    [AC_MSG_RESULT([--with-gnutls not specified])
     AC_CHECK_HEADERS([gnutls/abstract.h],
@@ -361,21 +341,21 @@ AC_DEFINE_UNQUOTED([HAVE_GNUTLS], $gnutls, [We have 
GnuTLS])
 # -D_FORTIFY_SOURCE=2 -fstack-protector-all
 AC_ARG_ENABLE(gcc-hardening,
    AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
-[if test x$enableval = xyes; then
+[AS_IF([test x$enableval = xyes],[
     CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
     CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
     CFLAGS="$CFLAGS --param ssp-buffer-size=1"
     LDFLAGS="$LDFLAGS -pie"
-fi])
+])])
 
 
 # Linker hardening options
 # Currently these options are ELF specific - you can't use this with MacOSX
 AC_ARG_ENABLE(linker-hardening,
   AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
-[if test x$enableval = xyes; then
+[AS_IF([test x$enableval = xyes],[
    LDFLAGS="$LDFLAGS -z relro -z now"
-fi])
+ ])])
 
 
 extra_logging=GNUNET_NO
@@ -401,17 +381,10 @@ AC_MSG_CHECKING(for GNUnet core)
 AC_ARG_WITH(gnunet,
    [  --with-gnunet=PFX       Base of GNUnet installation],
    [AC_MSG_RESULT([$with_gnunet])
-    case $with_gnunet in
-      no)
-        lookin=""
-        ;;
-      yes)
-        lookin="${prefix}"
-        ;;
-      *)
-        lookin="$with_gnunet"
-        ;;
-    esac
+    AS_CASE([$with_gnunet],
+      [no],[lookin=""].
+      [yes],[lookin="${prefix}"],
+      [lookin="$with_gnunet"])
    ],
    [
      AC_MSG_RESULT([--with-gnunet not specified])
@@ -427,8 +400,8 @@ AC_ARG_WITH(gnunet,
    ]
 )
 
-if test "x$gnunet" = "x0" -a ! "x$lookin" = "x"
-then
+AS_IF([test "x$gnunet" = "x0" -a ! "x$lookin" = "x"],
+[
   AC_MSG_CHECKING(for GNUnet util library in $lookin)
   backup_LIBS="$LIBS"
   backup_CFLAGS="$CFLAGS"
@@ -458,12 +431,10 @@ then
   LIBS="$backup_LIBS"
   CFLAGS="$backup_CFLAGS"
   CPPFLAGS="$backup_CPPFLAGS"
-fi
+])
 
-if test "x$gnunet" = "x0"
-then
-  AC_MSG_ERROR([gnunet-gtk requires GNUnet])
-fi
+AS_IF([test "x$gnunet" = "x0"],
+ [AC_MSG_ERROR([gnunet-gtk requires GNUnet])])
 
 AC_SUBST(GNUNET_CFLAGS)
 AC_SUBST(GNUNET_LIBS)
@@ -522,11 +493,10 @@ AC_SUBST(GNUNET_PEERINFO_GTK_YEARFROM, [2010], [year of 
the first release])
 AC_SUBST(GNUNET_STATISTICS_GTK_YEARFROM, [2010], [year of the first release])
 AC_SUBST(GNUNET_SETUP_GTK_YEARFROM, [2010], [year of the first release])
 
-if test -n "$SOURCE_DATE_EPOCH"; then
-       thisyear=$(date --utc --date="@SOURCE_DATE_EPOCH" +%Y)
-else
-       thisyear=$(date +%Y)
-fi
+AS_IF([test -n "$SOURCE_DATE_EPOCH"],
+      [thisyear=$(date --utc --date="@SOURCE_DATE_EPOCH" +%Y)],
+      [thisyear=$(date +%Y)])
+
 AC_SUBST(GNUNET_FS_GTK_YEARTO, ${thisyear}, [year of the most current release])
 AC_SUBST(GNUNET_PEERINFO_GTK_YEARTO, ${thisyear}, [year of the most current 
release])
 AC_SUBST(GNUNET_STATISTICS_GTK_YEARTO, ${thisyear}, [year of the most current 
release])

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



reply via email to

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