]> sjero.net Git - wget/commitdiff
Check for idna.h in /usr/include/idn.
authorMicah Cowan <micah@cowan.name>
Sat, 5 Sep 2009 20:33:52 +0000 (13:33 -0700)
committerMicah Cowan <micah@cowan.name>
Sat, 5 Sep 2009 20:33:52 +0000 (13:33 -0700)
ChangeLog
configure.ac

index eded1a8d170619762bd2896cff8203d8d2ce1ef4..0ee1e0bba41182982785c7b86baf25756ff5ee5e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-05  Micah Cowan  <micah@cowan.name>
+
+       * configure.ac: If we can't find idna.h, check to see if it's
+       because we need to add /usr/include/idn to the inclusion
+       path (for OpenSolaris).
+
 2009-09-04  Steven Schubiger  <stsc@member.fsf.org>
 
        * configure.ac: Place gl_EARLY and md5_EARLY before the gettext
 2009-09-04  Steven Schubiger  <stsc@member.fsf.org>
 
        * configure.ac: Place gl_EARLY and md5_EARLY before the gettext
index 58bb8ebc758604a2a70cd248fec92f0f1253598f..fd8f8397459a594bb76a59101cc115ced0e1c7db 100644 (file)
@@ -520,10 +520,21 @@ if test "X$iri" != "Xno"; then
     LDFLAGS="${LDFLAGS} -L$libidn/lib"
     CPPFLAGS="${CPPFLAGS} -I$libidn/include"
   fi
     LDFLAGS="${LDFLAGS} -L$libidn/lib"
     CPPFLAGS="${CPPFLAGS} -I$libidn/include"
   fi
-  AC_CHECK_HEADER(idna.h,
+
+  # If idna.h can't be found, check to see if it was installed under
+  # /usr/include/idn (OpenSolaris, at least, places it there).
+  # Check for idn-int.h in that case, because idna.h won't find
+  # idn-int.h until we've decided to add -I/usr/include/idn.
+  AC_CHECK_HEADER(idna.h, ,
+    [AC_CHECK_HEADER(idn/idn-int.h,
+                    [CPPFLAGS="${CPPFLAGS} -I/usr/include/idn"],
+                    [iri=no])]
+  )
+
+  if test "X$iri" != "Xno"; then
     AC_CHECK_LIB(idn, stringprep_check_version,
     AC_CHECK_LIB(idn, stringprep_check_version,
-      [iri=yes LIBS="${LIBS} -lidn"], iri=no),
-    iri=no)
+      [iri=yes LIBS="${LIBS} -lidn"], iri=no)
+  fi
 
   if test "X$iri" != "Xno" ; then
     AC_DEFINE(ENABLE_IRI, 1, [Define if IRI support is enabled.])
 
   if test "X$iri" != "Xno" ; then
     AC_DEFINE(ENABLE_IRI, 1, [Define if IRI support is enabled.])