Remove generated files
[framework/connectivity/libgphoto2.git] / libgphoto2_port / m4 / gp-dynamic-libraries.m4
1 AC_DEFUN([GP_DYNAMIC_LIBRARIES],[dnl
2 dnl We require either of those
3 dnl AC_REQUIRE([AC_LIBTTDL_INSTALLABLE])dnl
4 dnl AC_REQUIRE([AC_LIBLTDL_CONVENIENCE])dnl
5 AC_REQUIRE([AC_LIBTOOL_DLOPEN])dnl
6 AC_REQUIRE([AC_PROG_LIBTOOL])dnl
7 dnl ---------------------------------------------------------------------------
8 dnl Check for libltdl:
9 dnl  - lt_dlforeachfile has been introduced in libtool-1.4.
10 dnl  - However, there are still systems out there running libtool-1.3.
11 dnl    For those, we will use our shipped libltdl. This has the welcome
12 dnl    side effect that we don't have to distinguish between libltdl 1.3 with
13 dnl    and without the notorious segfault bug.
14 dnl  - FIXME: In case we're using our own version, we have to check whether
15 dnl           -ldl is required?
16 dnl ---------------------------------------------------------------------------
17 # $0
18 ltdl_msg="no (not found or too old)"
19 have_ltdl=false
20 LIBS_save="$LIBS"
21 LIBS="$LIBLTDL"
22 AC_CHECK_LIB([ltdl], [lt_dlforeachfile],[
23         CPPFLAGS_save="$CPPFLAGS"
24         CPPFLAGS="$LTDLINCL"
25         AC_CHECK_HEADER([ltdl.h],[
26                 AC_DEFINE([HAVE_LTDL],1,[whether we use libltdl])
27                 ltdl_msg="yes (from system)"
28                 have_ltdl=:
29         ])
30         CPPFLAGS="$CPPFLAGS_save"
31 ])
32 LIBS="$LIBS_save"
33 if "$have_ltdl"; then :; else
34         AC_MSG_CHECKING([for included libltdl])
35         if test -d "$srcdir/libltdl"; then
36                 LIBLTDL="\$(top_builddir)/libltdl/libltdlc.la"
37                 LTDLINCL="-I\$(top_srcdir)/libltdl"
38                 have_ltdl=:
39                 ltdl_msg="yes (included)"
40                 AC_MSG_RESULT([yes])
41         else
42                 AC_MSG_RESULT([no])
43                 AC_MSG_ERROR([
44 *** Could not detect or configure libltdl.
45 ])
46         fi
47 fi
48 GP_CONFIG_MSG([libltdl],["${ltdl_msg}"])
49 ])dnl
50 dnl
51 dnl ####################################################################
52 dnl
53 dnl Please do not remove this:
54 dnl filetype: 2b993145-3256-47b4-84fd-ec4dcdf4fdf9
55 dnl I use this to find all the different instances of this file which 
56 dnl are supposed to be synchronized.
57 dnl
58 dnl Local Variables:
59 dnl mode: autoconf
60 dnl End: