Bug 111627 - --with-libidn configure option does not work
Summary: --with-libidn configure option does not work
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: Jabber Plugin (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-28 01:48 UTC by Serge van den Boom
Modified: 2006-03-10 19:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serge van den Boom 2005-08-28 01:48:46 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.4 
OS:                Linux

Supplying the --with-libidn does not cause libidn to be found.

Using compilation options
    ./configure --prefix=/opt/kde-3.4.2 --disable-rpath --with-ssl-dir=/opt/openssl --with-qt-dir=/opt/qt --with-libidn=/opt/libidn --with-extra-includes=/opt/zlib/include: --with-extra-libs=/opt/zlib/lib

config.log shows:
configure:39845: checking idna.h usability
configure:39857: g++ -c -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wno-non-virtual-dtor -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -QT_NO_COMPAT -DQT_NO_TRANSLATION  -DQT_THREAD_SUPPORT  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/opt/kde-3.4.2/include -I/opt/qt/include -I/usr/X11R6/include  -I/opt/zlib/include conftest.cc >&5
conftest.cc:130:18: idna.h: No such file or directory
configure:39863: $? = 1

As you can see, the gcc line does not include a -I/opt/libidn/include switch.

Later on config.log does contain the following lines:
IDN_CPPFLAGS=' -DQT_THREAD_SUPPORT  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/opt/libidn/include'
IDN_LDFLAGS=' -L/opt/libidn/lib'
IDN_LIBS=''

Also, libidn provides a .pc file for pkg-config. Supplying a --with-libidl argument to configure would become unnecessary if pkg-config were to be supported.
Comment 1 Michaël Larouche 2006-03-10 19:52:49 UTC
SVN commit 517359 by mlarouche:

BUG: 111627

Use pkg-config to look for libidn.



 M  +8 -28     configure.in.in  
 M  +3 -3      jabber/libiris/iris/xmpp-core/Makefile.am  


--- branches/kopete/0.12/kopete/protocols/configure.in.in #517358:517359
@@ -133,40 +133,20 @@
 		       [AC_LIBGADU_DEFINE([HAVE__VA_COPY])],[])
 fi
 
-
-AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=DIR],
-            [Support IDN (needs GNU Libidn)]),
-            libidn=$withval, libidn=yes)
-
-if test "$libidn" != "no"; then
-	if test "$libidn" != "yes"; then
-		IDN_LDFLAGS="${LDFLAGS} -L$libidn/lib"
-		IDN_CPPFLAGS="${CPPFLAGS} -I$libidn/include"
-	fi
-fi
-
-KDE_CHECK_HEADER(idna.h,, libidn=no)
-
-if test "$libidn" != "no" ; then
-	KDE_CHECK_LIB(idn, stringprep_check_version,
-		[libidn=yes; IDN_LIBS="-lidn"], libidn=no)
-fi
-
-if test "$libidn" != "no" ; then
-	AC_DEFINE(LIBIDN, 1, [Define to 1 if you want IDN support.])
-else
+KDE_PKG_CHECK_MODULES(IDN, libidn, have_libidn=yes, have_libidn=no)
+if test x$have_libidn = xno; then
 	AC_MSG_WARN([Libidn not found, Kopete Jabber plugin will not be compiled])
+else
+	AC_DEFINE(LIBIDN, 1, [Define to 1 if you want IDN support.])
 fi
+AC_SUBST(IDN_CFLAGS)
+AC_SUBST(IDN_LIBS)
 
 AC_MSG_CHECKING([if Libidn can be used])
-AC_MSG_RESULT($libidn)
+AC_MSG_RESULT($have_libidn)
 
-AM_CONDITIONAL(include_jabber, test "$libidn" = "yes")
+AM_CONDITIONAL(include_jabber, test "$have_libidn" = "yes")
 
-AC_SUBST(IDN_LDFLAGS)
-AC_SUBST(IDN_CPPFLAGS)
-AC_SUBST(IDN_LIBS)
-
 # Sametime support
 
 # lower and upper-bound versions of Meanwhile library
--- branches/kopete/0.12/kopete/protocols/jabber/libiris/iris/xmpp-core/Makefile.am #517358:517359
@@ -3,11 +3,11 @@
 METASOURCES = ignore_this_warning.moc
 
 noinst_LTLIBRARIES = libiris_xmpp_core.la
-AM_CPPFLAGS = $(IDN_CPPFLAGS)
+AM_CPPFLAGS = $(IDN_CFLAGS)
 INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../xmpp-core -I$(srcdir)/../xmpp-im -I$(srcdir)/../../cutestuff/util -I$(srcdir)/../../cutestuff/network -I$(srcdir)/../../qca/src $(all_includes)
 
-libiris_xmpp_core_la_CPPFLAGS = $(IDN_CPPFLAGS)
-libiris_xmpp_core_la_LDFLAGS = $(IDN_LDFLAGS) $(IDN_LIBS)
+libiris_xmpp_core_la_CPPFLAGS = $(IDN_CFLAGS)
+libiris_xmpp_core_la_LDFLAGS = $(IDN_LIBS)
 libiris_xmpp_core_la_SOURCES = \
 	connector.cpp \
 	jid.cpp \