commit-inetutils
[Top][All Lists]
Advanced

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

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-276-gd3afc


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-276-gd3afcfa
Date: Wed, 24 Apr 2013 20:49:35 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  d3afcfa566f68e26060f465a0439af7e36ffe653 (commit)
      from  ac310a022cadcf973dda62607186bc67769a6c37 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=d3afcfa566f68e26060f465a0439af7e36ffe653


commit d3afcfa566f68e26060f465a0439af7e36ffe653
Author: Mats Erik Andersson <address@hidden>
Date:   Tue Apr 23 23:55:56 2013 +0200

    Detection of libidn and krb5.

diff --git a/ChangeLog b/ChangeLog
index b10841a..88cce1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2013-04-23  Mats Erik Andersson  <address@hidden>
+
+       * configure.ac <libidn detection>: Replace by a call
+       to IU_CHECK_LIBIDN.
+       * am/libidn.m4 (IU_CHECK_LIBIDN): New file, new macro.
+
+       * am/krb5.m4 (IU_CHECK_KRB5): Detect res_query using
+       AC_SEARCH_LIBS for better portability to BSD.
+       Set KRB5_IMPL to `krb5-config' if krb5-config is
+       available to provide compiler flags.  If KRB5_PREFIX
+       is `yes' and krb5-config does not exist, use the
+       location `-I/usr/include/krb5' for KRB5_CFLAGS.
+       Do not add $KRB4_LIBS to KRB5_LIBS when detecting
+       either `MIT' or `Heimdal'.
+
 2013-04-19  Mats Erik Andersson  <address@hidden>
 
        rlogind, rshd: Diagnostics with libshishi.
diff --git a/am/krb5.m4 b/am/krb5.m4
index 9ef53b9..cc92a31 100644
--- a/am/krb5.m4
+++ b/am/krb5.m4
@@ -21,17 +21,21 @@ dnl along with this program.  If not, see 
`http://www.gnu.org/licenses/'.
 dnl Written by Miles Bader.
 
 dnl IU_CHECK_KRB5(VERSION,PREFIX)
-dnl Search for a Kerberos implementation in the standard locations plus PREFIX,
-dnl if it is set and not "yes".
-dnl VERSION should be either 4 or 5
+dnl Search for a Kerberos implementation in the standard locations
+dnl plus PREFIX, if it is set and is not "yes".
+dnl VERSION should be either 4 or 5.
+dnl
 dnl Defines KRB5_CFLAGS and KRB5_LIBS if found.
-dnl Defines KRB_IMPL to "Heimdal", "MIT", or "OldMIT", or "none" if not found
+dnl Defines KRB5_IMPL to "krb5-config", "Heimdal", "MIT",
+dnl "OpenBSD-Heimdal", or "OldMIT", if found, and to "none"
+dnl otherwise.
+
 AC_DEFUN([IU_CHECK_KRB5],
 [
  if test "x$iu_cv_lib_krb5_libs" = x; then
   cache=""
   ## Make sure we have res_query
-  AC_CHECK_LIB(resolv, res_query)
+  AC_SEARCH_LIBS([res_query], [resolv])
   KRB5_PREFIX=[$2]
   KRB5_IMPL="none"
   # First try krb5-config
@@ -44,7 +48,7 @@ AC_DEFUN([IU_CHECK_KRB5],
   if test "$KRB5CFGPATH" != "none"; then
     KRB5_CFLAGS="$CPPFLAGS `$KRB5CFGPATH --cflags krb$1`"
     KRB5_LIBS="$LDFLAGS `$KRB5CFGPATH --libs krb$1`"
-    KRB5_IMPL="Heimdal"
+    KRB5_IMPL="krb5-config"
   else
     ## OK, try the old code
     saved_CPPFLAGS="$CPPFLAGS"
@@ -53,23 +57,26 @@ AC_DEFUN([IU_CHECK_KRB5],
     if test "$KRB5_PREFIX" != "yes"; then
       KRB5_CFLAGS="-I$KRB5_PREFIX/include"
       KRB5_LDFLAGS="-L$KRB5_PREFIX/lib"
-      CPPFLAGS="$CPPFLAGS $KRB5_CFLAGS"
       LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"
+    else
+      ## A very common location in recent times.
+      KRB5_CFLAGS="-I/usr/include/krb5"
     fi
+    CPPFLAGS="$CPPFLAGS $KRB5_CFLAGS"
     KRB4_LIBS="-lkrb4 -ldes425"
 
     ## Check for new MIT kerberos V support
     LIBS="$saved_LIBS -lkrb5 -lk5crypto -lcom_err"
     AC_TRY_LINK([], [return krb5_init_context((void *) 0); ],
       [KRB5_IMPL="MIT"
-       KRB5_LIBS="$KRB5_LDFLAGS $KRB4_LIBS -lkrb5 -lk5crypto -lcom_err"], )
+       KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -lk5crypto -lcom_err"], )
 
     ## Heimdal kerberos V support
     if test "$KRB5_IMPL" = "none"; then
       LIBS="$saved_LIBS -lkrb5 -ldes -lasn1 -lroken -lcrypt -lcom_err"
       AC_TRY_LINK([], [return krb5_init_context((void *) 0); ],
         [KRB5_IMPL="Heimdal"
-         KRB5_LIBS="$KRB5_LDFLAGS $KRB4_LIBS -lkrb5 -ldes -lasn1 -lroken 
-lcrypt -lcom_err"]
+         KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -ldes -lasn1 -lroken -lcrypt 
-lcom_err"]
          , )
     fi
 
diff --git a/am/libidn.m4 b/am/libidn.m4
new file mode 100644
index 0000000..524bf06
--- /dev/null
+++ b/am/libidn.m4
@@ -0,0 +1,72 @@
+# libidn.m4 serial 1
+dnl Copyright (C) 2013 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Inetutils.
+dnl
+dnl GNU Inetutils is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or (at
+dnl your option) any later version.
+dnl
+dnl GNU Inetutils is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see `http://www.gnu.org/licenses/'.
+
+dnl Written by Mats Erik Andersson.
+
+dnl IU_CHECK_LIBIDN([PREFIX],[HEADERLOC])
+dnl Search for libidn in standard location and in PREFIX,
+dnl if the latter is set and is neither "yes", nor "no".
+dnl
+dnl First check: $with_idn != no
+
+AC_DEFUN([IU_CHECK_LIBIDN],
+[
+if test x"$with_idn" != xno \
+    && test "$ac_cv_header_locale_h" = yes \
+    && test "$ac_cv_func_setlocale" = yes
+then
+  if test -n "$1" \
+      && test x"$1" != xno \
+      && test x"$1" != xyes
+  then
+    INCIDN=-I$1/include
+    LIBIDN=-L$1/lib
+  fi
+
+  if test -n "$2" \
+      && test x"$2" != xyes
+  then
+    INCIDN=-I$2
+  fi
+
+  AC_CHECK_LIB([idn], [idna_to_ascii_lz],
+              [LIBIDN="$LIBIDN -lidn"], [INCIDN= LIBIDN=],
+              [$LIBIDN])
+
+  # Some systems are known to install <idna.h> below
+  # '/usr/include/idn'.  The caching performed by
+  # AC_CHECK_HEADERS prevents detection of this using
+  # repeated call of the macro.  Functional alternative?
+  save_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS="$CPPFLAGS $INCIDN"
+  AC_CHECK_HEADERS([idna.h])
+
+  AC_MSG_CHECKING([if GNU libidn is available])
+  if test "$ac_cv_lib_idn_idna_to_ascii_lz" = yes \
+      && test "$ac_cv_header_idna_h" = yes; then
+    AC_DEFINE(HAVE_IDN, 1, [Define to 1 for use of GNU Libidn.])
+    AC_MSG_RESULT($ac_cv_lib_idn_idna_to_ascii_lz)
+  else
+    AC_MSG_RESULT([no])
+    INCIDN= LIBIDN=
+  fi
+  CPPFLAGS=$save_CPPFLAGS
+fi
+AC_SUBST([LIBIDN])
+AC_SUBST([INCIDN])
+])# IU_CHECK_LIBIDN
diff --git a/configure.ac b/configure.ac
index 22e42ff..9b49f4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -578,34 +578,7 @@ AC_SUBST(LIBWRAP)
 AC_CHECK_HEADERS([locale.h])
 AC_CHECK_FUNCS([setlocale])
 
-if test x"$with_idn" != xno \
-    && test "$ac_cv_header_locale_h" = yes \
-    && test "$ac_cv_func_setlocale" = yes; then
-  if test x"$with_libidn_prefix" != xno \
-      && test x"$with_libidn_prefix" != xyes; then
-    INCIDN=-I$with_libidn_prefix/include
-    LIBIDN=-L$with_libidn_prefix/lib
-  fi
-  if test x"$with_idn" != xyes; then
-    INCIDN=-I$with_idn
-  fi
-  save_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS $INCIDN"
-  AC_CHECK_HEADERS([idna.h])
-  if test "$ac_cv_header_idna_h" = yes; then
-    AC_CHECK_LIB(idn, idna_to_ascii_lz,
-                [LIBIDN="$LIBIDN -lidn"], [INCIDN= LIBIDN=],
-                [$LIBIDN])
-    AC_MSG_CHECKING([if GNU libidn is available])
-    if test "$ac_cv_lib_idn_idna_to_ascii_lz" = yes; then
-      AC_DEFINE(HAVE_IDN, 1, [Define to 1 for use of GNU Libidn.])
-    fi
-    AC_MSG_RESULT($ac_cv_lib_idn_idna_to_ascii_lz)
-  fi
-  CPPFLAGS=$save_CPPFLAGS
-fi
-AC_SUBST([LIBIDN])
-AC_SUBST([INCIDN])
+IU_CHECK_LIBIDN([$with_libidn_prefix], [$with_idn])
 
 ### Checks for header files.
 
@@ -1042,12 +1015,12 @@ rlogind_PROPS="${rlogind_PROPS:+$rlogind_PROPS 
}$LIBWRAP"
 
 # Support for libidn.
 
-ftp_PROPS="${ftp_PROPS:+$ftp_PROPS }${LIBIDN:+-libidn}"
-ping_PROPS="${ping_PROPS:+$ping_PROPS }${LIBIDN:+-libidn}"
-talk_PROPS="${talk_PROPS:+$talk_PROPS }${LIBIDN:+-libidn}"
-telnet_PROPS="${telnet_PROPS:+$telnet_PROPS }${LIBIDN:+-libidn}"
-tftp_PROPS="${tftp_PROPS:+$tftp_PROPS }${LIBIDN:+-libidn}"
-traceroute_PROPS="${traceroute_PROPS:+$traceroute_PROPS }${LIBIDN:+-libidn}"
+ftp_PROPS="${ftp_PROPS:+$ftp_PROPS }${LIBIDN:+-lidn}"
+ping_PROPS="${ping_PROPS:+$ping_PROPS }${LIBIDN:+-lidn}"
+talk_PROPS="${talk_PROPS:+$talk_PROPS }${LIBIDN:+-lidn}"
+telnet_PROPS="${telnet_PROPS:+$telnet_PROPS }${LIBIDN:+-lidn}"
+tftp_PROPS="${tftp_PROPS:+$tftp_PROPS }${LIBIDN:+-lidn}"
+traceroute_PROPS="${traceroute_PROPS:+$traceroute_PROPS }${LIBIDN:+-lidn}"
 
 # Termcap variants.
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |   15 ++++++++++++
 am/krb5.m4   |   25 +++++++++++++-------
 am/libidn.m4 |   72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac |   41 +++++---------------------------
 4 files changed, 110 insertions(+), 43 deletions(-)
 create mode 100644 am/libidn.m4


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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