This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] Re: [PATCH] Add libidn/idn-stub-static.c
> On Tue, Oct 9, 2012 at 2:11 PM, Roland McGrath <roland@hack.frob.com> wrote:
> > Why is that needed? A static build still has libdl.a and so forth.
> > It should just fail to find any DSO at runtime.
>
> idn-stub.c has
>
> #include <ctype.h>
> #include <stdio.h>
> #include <string.h>
> #include <dlfcn.h>
> #include <gnu/lib-names.h>
>
> But lib-names.h doesn't define LIBCIDN_SO since DSO
> is disabled. My patch provides a dummy one without
> loading DSO.
I see. Since this is the only point of the libidn add-on, it's better just
to disable it entirely. I've committed the following.
Thanks,
Roland
libidn/
2012-10-09 Roland McGrath <roland@hack.frob.com>
* configure.in: If $shared != yes, just disable the add-on entirely
and issue a warning.
* configure: Regenerated.
diff --git a/libidn/configure b/libidn/configure
index c6ba2ee..39ed163 100644
--- a/libidn/configure
+++ b/libidn/configure
@@ -1,8 +1,16 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
libc_add_on_canonical=
-libc_add_on_subdirs=.
-# Get this defined in config.h for main source code to test.
-$as_echo "#define HAVE_LIBIDN 1" >>confdefs.h
+if test "$shared" = yes; then :
+ libc_add_on_subdirs=.
+
+ # Get this defined in config.h for main source code to test.
+ $as_echo "#define HAVE_LIBIDN 1" >>confdefs.h
+
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libidn add-on ignored with --disable-shared" >&5
+$as_echo "$as_me: WARNING: libidn add-on ignored with --disable-shared" >&2;}
+fi
diff --git a/libidn/configure.in b/libidn/configure.in
index 38b9ad7..16740ff 100644
--- a/libidn/configure.in
+++ b/libidn/configure.in
@@ -2,7 +2,10 @@ dnl glibc configure fragment for libidn add-on
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
libc_add_on_canonical=
-libc_add_on_subdirs=.
-# Get this defined in config.h for main source code to test.
-AC_DEFINE([HAVE_LIBIDN])
+AS_IF([test "$shared" = yes], [
+ libc_add_on_subdirs=.
+
+ # Get this defined in config.h for main source code to test.
+ AC_DEFINE([HAVE_LIBIDN])
+], [AC_MSG_WARN([libidn add-on ignored with --disable-shared])])