gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r8117 - in GNUnet: . m4


From: gnunet
Subject: [GNUnet-SVN] r8117 - in GNUnet: . m4
Date: Fri, 16 Jan 2009 05:47:12 -0700 (MST)

Author: holindho
Date: 2009-01-16 05:47:11 -0700 (Fri, 16 Jan 2009)
New Revision: 8117

Added:
   GNUnet/m4/libltdl-external.m4
Modified:
   GNUnet/Makefile.am
   GNUnet/configure.ac
Log:
throw out local libltdl


Modified: GNUnet/Makefile.am
===================================================================
--- GNUnet/Makefile.am  2009-01-15 23:19:55 UTC (rev 8116)
+++ GNUnet/Makefile.am  2009-01-16 12:47:11 UTC (rev 8117)
@@ -1,5 +1,5 @@
 INCLUDES = -I$(top_srcdir)/src/include
-SUBDIRS  = m4 po libltdl src doc contrib
+SUBDIRS  = m4 po src doc contrib
 
 EXTRA_DIST = \
  ABOUT-NLS \

Modified: GNUnet/configure.ac
===================================================================
--- GNUnet/configure.ac 2009-01-15 23:19:55 UTC (rev 8116)
+++ GNUnet/configure.ac 2009-01-16 12:47:11 UTC (rev 8117)
@@ -39,9 +39,7 @@
 AC_PROG_MAKE_SET
 LT_CONFIG_LTDL_DIR([libltdl])
 LT_INIT([disable-static dlopen win32-dll])
-LTDL_INIT
-AC_SUBST(LTDLINCL)
-AC_SUBST(LIBLTDL)
+AM_PATH_LIBLTDL([lt_dlopenext lt_dlsym], ,AC_MSG_ERROR([GNUnet needs libltdl]))
 AC_SUBST(MKDIR_P)
 
 # large file support

Added: GNUnet/m4/libltdl-external.m4
===================================================================
--- GNUnet/m4/libltdl-external.m4                               (rev 0)
+++ GNUnet/m4/libltdl-external.m4       2009-01-16 12:47:11 UTC (rev 8117)
@@ -0,0 +1,67 @@
+dnl Autoconf macro for an always external libltdl
+dnl       Copyright (C) 2009 Heikki Lindholm
+dnl
+dnl This file is free software; as a special exception the author gives
+dnl unlimited permission to copy and/or distribute it, with or without
+dnl modifications, as long as this notice is preserved.
+dnl
+dnl This file is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+dnl AM_PATH_LIBLTDL(
+dnl  [CHECK-SYMBOLS, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl
+AC_DEFUN([AM_PATH_LIBLTDL],
+[ AC_ARG_WITH(libltdl-prefix,
+            AC_HELP_STRING([--with-libltdl-prefix=PFX],
+                           [prefix where libltdl is installed (optional)]),
+     libltdl_prefix="$withval", libltdl_prefix="")
+  if test x$libltdl_prefix != x ; then
+    ltdl_save_CPPFLAGS="$CPPFLAGS"
+    ltdl_save_LDFLAGS="$LDFLAGS"
+    CPPFLAGS="-I$libltdl_prefix/include $CPPFLAGS"
+    LDFLAGS="-L$libltdl_prefix/lib $LDFLAGS"
+  fi
+
+  symbols_to_check=ifelse([$1], ,"ltdl_dlopen","$1")
+  ltdl_found=yes
+  AC_CHECK_HEADER([ltdl.h],
+    [
+    for sym in $symbols_to_check
+    do
+      AC_CHECK_DECL([$sym],
+        [AC_CHECK_LIB([ltdl], [$sym],
+          [ltdl_found=yes],
+          [ltdl_found=no])],
+        [ltdl_found=no],
+       [AC_INCLUDES_DEFAULT
+        #include <ltdl.h>])
+    done
+    ],
+    [ltdl_found=no],
+    [AC_INCLUDES_DEFAULT]
+  )
+
+  LTDLINCL=""
+  LIBLTDL="-lltdl"
+  if test x$libltdl_prefix != x ; then
+    CPPFLAGS="$ltdl_save_CPPFLAGS"
+    LDFLAGS="$ltdl_save_LDFLAGS"
+    LTDLINCL="-I$libltdl_prefix/include"
+    LIBLTDL="-L$libltdl_prefix/lib -lltdl"
+  fi
+
+  AC_MSG_CHECKING(for libltdl with symbols $symbols_to_check)
+  if test $ltdl_found = yes; then
+    AC_MSG_RESULT(yes)
+    ifelse([$2], , :, [$2])
+  else
+    LTDLINCL=""
+    LIBLTDL=""
+    AC_MSG_RESULT(no)
+    ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(LTDLINCL)
+  AC_SUBST(LIBLTDL)
+])





reply via email to

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