fix -lidn(2) linkage by adding missing AM_CONDITIONAL and missing endif statements
authorChristian Grothoff <christian@grothoff.org>
Thu, 25 Oct 2018 10:00:16 +0000 (12:00 +0200)
committerChristian Grothoff <christian@grothoff.org>
Thu, 25 Oct 2018 10:01:28 +0000 (12:01 +0200)
configure.ac
po/POTFILES.in
src/util/Makefile.am

index e36d0b2d3cbbf3e28e0e64cecea77f3440cd4584..f0ab98390152111c3e55afe14bb8a695c32fd6d9 100644 (file)
@@ -907,6 +907,7 @@ AC_MSG_CHECKING([if libidn can be used])
 # Check for LIBIDNs
 there_can_only_be_one=1
 
+working_libidn1=0
 working_libidn2=0
 if test $my_with_libidn2 = 1
 then
@@ -915,12 +916,13 @@ then
                      [idn2_to_unicode_8z8z],
                      [working_libidn2=1
                      LIBS="-lidn2 $LIBS"
-                     AC_DEFINE_UNQUOTED([HAVE_LIBIDN2],
+                    AC_DEFINE_UNQUOTED([HAVE_LIBIDN2],
                                         [1],
                                         [Define to 1 if you have 'libidn2' (-lidn).])],
                      [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2"
                      MISSING_SEP=", "])
 fi
+AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1)
 if test $working_libidn2 = 0
 then
         if test $my_with_libidn = 1
@@ -928,7 +930,8 @@ then
                 AC_MSG_NOTICE([Checking for libidn])
                 AC_CHECK_LIB([idn],
                              [idna_to_ascii_8z],
-                             [LIBS="-lidn $LIBS"
+                             [working_libidn1=1
+                            LIBS="-lidn $LIBS"                      
                              AC_DEFINE_UNQUOTED([HAVE_LIBIDN],
                                                 [1],
                                                 [Define to 1 if you have 'libidn' (-lidn).])],
@@ -947,6 +950,7 @@ then
                 fi
         fi
 fi
+AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1)
 
 if test $there_can_only_be_one = 0
 then
index 36cc7cdff55354902622a6523177c3cd21741f94..bb785afd997bf95501d7cb710224a2dbe5f2b264 100644 (file)
@@ -524,7 +524,6 @@ src/fs/fs_api.h
 src/include/gnunet_common.h
 src/include/gnunet_mq_lib.h
 src/include/gnunet_time_lib.h
-src/rps/rps-test_util.h
 src/scalarproduct/scalarproduct.h
 src/testbed/testbed_api.h
 src/testbed/testbed_api_operations.h
index 165d41d0180ae61dbb281ad9129a5361fb28323b..fc5a4648ccf46a34f8e3904c217b357fd944b3e8 100644 (file)
@@ -126,18 +126,25 @@ if HAVE_LIBIDN
   LIBIDN= -lidn
 else
   LIBIDN=
+endif
 
 if HAVE_LIBIDN2
   LIBIDN2= -lidn2
 else
   LIBIDN2=
+endif
 
 libgnunetutil_la_LIBADD = \
   $(GCLIBADD) $(WINLIB) \
   $(LIBGCRYPT_LIBS) \
   $(LTLIBICONV) \
   $(LTLIBINTL) \
-  -lltdl $(LIBIDN) $(LIBIDN2) $(Z_LIBS) -lunistring $(XLIB) $(PTHREAD)
+  -lltdl \
+  $(LIBIDN) $(LIBIDN2) \
+  $(Z_LIBS) \
+  -lunistring \
+  $(XLIB) \
+  $(PTHREAD)
 
 libgnunetutil_la_LDFLAGS = \
   $(GN_LIB_LDFLAGS) \