monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] [patch] use system libidn


From: Martin Waitz
Subject: [Monotone-devel] [patch] use system libidn
Date: Mon, 19 Apr 2004 00:46:20 +0200
User-agent: Mutt/1.5.5.1+cvs20040105i

hi :)

i use the following patch to use my system's libidn

=======================================================================
--- monotone-0.11.orig/Makefile.am
+++ monotone-0.11/Makefile.am
@@ -129,11 +129,14 @@
 noinst_LIBRARIES = lib3rdparty.a 
 lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_SOURCES) \
                        $(CRYPTOPP_SOURCES) \
-                       $(IDNA_SOURCES) \
                        $(NETXX_SOURCES)
 
 AM_CPPFLAGS =
 
+if BUNDLED_IDNA
+lib3rdparty_a_SOURCES += $(IDNA_SOURCES)
+endif
+
 if BUNDLED_ADNS
 lib3rdparty_a_SOURCES += $(ADNS_SOURCES)
 AM_CPPFLAGS += -I$(top_srcdir)/adns
--- monotone-0.11.orig/configure.ac
+++ monotone-0.11/configure.ac
@@ -173,6 +175,28 @@
 
 
 ##########
+# Checks for external idn library, revert to bundled version if not found
+# or user gives --with-bundled-idna.
+AC_ARG_WITH([bundled-idna],
+   AC_HELP_STRING(
+      [--with-bundled-idna],
+      [Force use of bundled version of idn (default=no)]
+   ), , [bundled_idna=no]
+)
+
+if test "x$bundled_idna" = "xno" ; then
+   bundled_idna=yes
+   PKG_CHECK_MODULES(IDN, libidn,
+      [LIBS="$LIBS $IDN_LIBS";
+       CFLAGS="$CFLAGS $IDN_CFLAGS";
+       CXXFLAGS="$CXXFLAGS $IDN_CFLAGS";
+       bundled_idna=no]
+   )
+fi
+
+AM_CONDITIONAL(BUNDLED_IDNA, test "x$bundled_idna" != "xno")
+
+##########
 # Checks for external adns library, revert to bundled version if not found
 # or user gives --with-bundled-adns.
 AC_ARG_WITH([bundled-adns],
=======================================================================

by the way, why is the bundled version named idnA?


additionally, i use the following patch to make configure use my
lua50

=======================================================================
--- monotone-0.11.orig/configure.ac
+++ monotone-0.11/configure.ac
@@ -205,12 +229,11 @@
 
 if test "x$bundled_lua" = "xno" ; then
    bundled_lua=yes
-   AC_CHECK_HEADERS([lua.h lualib.h],
-      AC_CHECK_LIB([lua], [lua_open],
-         AC_CHECK_LIB([lualib], [luaopen_base],
-            [LIBS="$LIBS -llua -llualib" ; bundled_lua=no], , [-llua]
-         )
-      )
+   PKG_CHECK_MODULES(LUA, lua50 lualib50,
+      [LIBS="$LIBS $LUA_LIBS";
+       CFLAGS="$CFLAGS $LUA_CFLAGS";
+       CXXFLAGS="$CXXFLAGS $LUA_CFLAGS";
+       bundled_lua=no], , [-llua]
    )
 fi
 
=======================================================================

but i guess we need something more advanced to make the lua 4 users
happy, too...

hope that helps :)

-- 
Martin Waitz

Attachment: signature.asc
Description: Digital signature


reply via email to

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