annotate acinclude/ltdl.m4 @ 4661:03dcb795c583

Merged changes from the main SDL codebase
author Sam Lantinga <slouken@libsdl.org>
date Mon, 12 Jul 2010 21:09:23 -0700
parents 437378d409b1
children
rev   line source
3342
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 ##############################################################################
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 #
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4 # Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 # Written by Thomas Tanner, 1999
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 #
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 # This file is free software; the Free Software Foundation gives
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 # unlimited permission to copy and/or distribute it, with or without
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9 # modifications, as long as this notice is preserved.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 # serial 17 LTDL_INIT
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14 # ------------------------------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 # DIRECTORY contains the libltdl sources. It is okay to call this
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 # function multiple times, as long as the same DIRECTORY is always given.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 AC_DEFUN([LT_CONFIG_LTDL_DIR],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18 [AC_BEFORE([$0], [LTDL_INIT])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 _$0($*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 ])# LT_CONFIG_LTDL_DIR
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 # We break this out into a separate macro, so that we can call it safely
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 # internally without being caught accidentally by the sed scan in libtoolize.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 m4_defun([_LT_CONFIG_LTDL_DIR],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 [dnl remove trailing slashes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 m4_case(_LTDL_DIR,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 m4_if(_ARG_DIR, [.],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30 [],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 [m4_define([_LTDL_DIR], _ARG_DIR)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 [m4_if(_ARG_DIR, _LTDL_DIR,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 [],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35 [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 m4_popdef([_ARG_DIR])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 ])# _LT_CONFIG_LTDL_DIR
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 # Initialise:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40 m4_define([_LTDL_DIR], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43 # _LT_BUILD_PREFIX
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44 # ----------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45 # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 # to `${top_builddir}/'.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 m4_define([_LT_BUILD_PREFIX],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 [m4_ifdef([AC_AUTOCONF_VERSION],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49 [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51 [${top_build_prefix}],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52 [${top_builddir}/])],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53 [${top_build_prefix}])],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 [${top_builddir}/])[]dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55 ])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58 # LTDL_CONVENIENCE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 # ----------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60 # sets LIBLTDL to the link flags for the libltdl convenience library and
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 # LTDLINCL to the include flags for the libltdl header and adds
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62 # --enable-ltdl-convenience to the configure arguments. Note that
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
63 # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
64 # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
65 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
66 # quotes!). If your package is not flat and you're not using automake,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
67 # define top_build_prefix, top_builddir, and top_srcdir appropriately
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
68 # in your Makefiles.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
69 AC_DEFUN([LTDL_CONVENIENCE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
70 [AC_BEFORE([$0], [LTDL_INIT])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
71 dnl Although the argument is deprecated and no longer documented,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
72 dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
73 dnl here make sure it is the same as any other declaration of libltdl's
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
74 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
75 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
76 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
77 _$0()
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
78 ])# LTDL_CONVENIENCE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
79
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
80 # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
81 # now we have LT_CONFIG_LTDL_DIR:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
82 AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
83 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
84 _LTDL_CONVENIENCE])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
85
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
86 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
87 dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
88
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
89
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
90 # _LTDL_CONVENIENCE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
91 # -----------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
92 # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
93 m4_defun([_LTDL_CONVENIENCE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
94 [case $enable_ltdl_convenience in
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
95 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
96 "") enable_ltdl_convenience=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
97 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
98 esac
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
99 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
100 LTDLDEPS=$LIBLTDL
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
101 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
102
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
103 AC_SUBST([LIBLTDL])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
104 AC_SUBST([LTDLDEPS])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
105 AC_SUBST([LTDLINCL])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
106
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
107 # For backwards non-gettext consistent compatibility...
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
108 INCLTDL="$LTDLINCL"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
109 AC_SUBST([INCLTDL])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
110 ])# _LTDL_CONVENIENCE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
111
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
112
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
113 # LTDL_INSTALLABLE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114 # ----------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
115 # sets LIBLTDL to the link flags for the libltdl installable library
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
116 # and LTDLINCL to the include flags for the libltdl header and adds
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
117 # --enable-ltdl-install to the configure arguments. Note that
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
118 # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
119 # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
120 # available, otherwise with '${top_builddir}/', and LTDLINCL will be
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121 # prefixed with '${top_srcdir}/' (note the single quotes!). If your
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
122 # package is not flat and you're not using automake, define top_build_prefix,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
123 # top_builddir, and top_srcdir appropriately in your Makefiles.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
124 # In the future, this macro may have to be called after LT_INIT.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
125 AC_DEFUN([LTDL_INSTALLABLE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126 [AC_BEFORE([$0], [LTDL_INIT])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127 dnl Although the argument is deprecated and no longer documented,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
129 dnl here make sure it is the same as any other declaration of libltdl's
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
130 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
131 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
132 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
133 _$0()
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
134 ])# LTDL_INSTALLABLE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
135
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
136 # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
137 # now we have LT_CONFIG_LTDL_DIR:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
138 AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
139 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
140 _LTDL_INSTALLABLE])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
141
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
142 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
143 dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
144
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
145
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
146 # _LTDL_INSTALLABLE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
147 # -----------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
148 # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
149 m4_defun([_LTDL_INSTALLABLE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
150 [if test -f $prefix/lib/libltdl.la; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
151 lt_save_LDFLAGS="$LDFLAGS"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
152 LDFLAGS="-L$prefix/lib $LDFLAGS"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
153 AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
154 LDFLAGS="$lt_save_LDFLAGS"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
155 if test x"${lt_lib_ltdl-no}" = xyes; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
156 if test x"$enable_ltdl_install" != xyes; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
157 # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
158 AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
159 enable_ltdl_install=no
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
160 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
161 elif test x"$enable_ltdl_install" = xno; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
162 AC_MSG_WARN([libltdl not installed, but installation disabled])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
163 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
164 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
165
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
166 # If configure.ac declared an installable ltdl, and the user didn't override
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
167 # with --disable-ltdl-install, we will install the shipped libltdl.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
168 case $enable_ltdl_install in
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
169 no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
170 LIBLTDL="-lltdl"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
171 LTDLDEPS=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
172 LTDLINCL=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
173 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
174 *) enable_ltdl_install=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
175 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
176 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
177 LTDLDEPS=$LIBLTDL
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
178 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
179 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
180 esac
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
181
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
182 AC_SUBST([LIBLTDL])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
183 AC_SUBST([LTDLDEPS])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
184 AC_SUBST([LTDLINCL])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
185
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
186 # For backwards non-gettext consistent compatibility...
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
187 INCLTDL="$LTDLINCL"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
188 AC_SUBST([INCLTDL])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
189 ])# LTDL_INSTALLABLE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
190
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
191
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
192 # _LTDL_MODE_DISPATCH
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
193 # -------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
194 m4_define([_LTDL_MODE_DISPATCH],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
195 [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
196 m4_if(_LTDL_DIR, [],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
197 [],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
198 dnl if _LTDL_MODE was not set already, the default value is `subproject':
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
199 [m4_case(m4_default(_LTDL_MODE, [subproject]),
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
200 [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
201 _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
202 [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
203 [recursive], [],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
204 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
205 dnl Be careful not to expand twice:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
206 m4_define([$0], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
207 ])# _LTDL_MODE_DISPATCH
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
208
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
209
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
210 # _LT_LIBOBJ(MODULE_NAME)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
211 # -----------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
212 # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
213 # of into LIBOBJS.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
214 AC_DEFUN([_LT_LIBOBJ], [
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
215 m4_pattern_allow([^_LT_LIBOBJS$])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
216 _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
217 ])# _LT_LIBOBJS
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
218
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
219
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
220 # LTDL_INIT([OPTIONS])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
221 # --------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
222 # Clients of libltdl can use this macro to allow the installer to
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
223 # choose between a shipped copy of the ltdl sources or a preinstalled
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
224 # version of the library. If the shipped ltdl sources are not in a
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
225 # subdirectory named libltdl, the directory name must be given by
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
226 # LT_CONFIG_LTDL_DIR.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
227 AC_DEFUN([LTDL_INIT],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
228 [dnl Parse OPTIONS
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
229 _LT_SET_OPTIONS([$0], [$1])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
230
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
231 dnl We need to keep our own list of libobjs separate from our parent project,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
232 dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
233 dnl we look for our own LIBOBJs.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
234 m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
235 m4_pushdef([AC_LIBSOURCES])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
236
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
237 dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
238 m4_if(_LTDL_MODE, [],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
239 [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
240 m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
241 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
242
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
243 AC_ARG_WITH([included_ltdl],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
244 [AS_HELP_STRING([--with-included-ltdl],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
245 [use the GNU ltdl sources included here])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
246
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
247 if test "x$with_included_ltdl" != xyes; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
248 # We are not being forced to use the included libltdl sources, so
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
249 # decide whether there is a useful installed version we can use.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
250 AC_CHECK_HEADER([ltdl.h],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
251 [AC_CHECK_DECL([lt_dlinterface_register],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
252 [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
253 [with_included_ltdl=no],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
254 [with_included_ltdl=yes])],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
255 [with_included_ltdl=yes],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
256 [AC_INCLUDES_DEFAULT
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
257 #include <ltdl.h>])],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
258 [with_included_ltdl=yes],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
259 [AC_INCLUDES_DEFAULT]
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
260 )
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
261 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
262
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
263 dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
264 dnl was called yet, then for old times' sake, we assume libltdl is in an
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
265 dnl eponymous directory:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
266 AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
267
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
268 AC_ARG_WITH([ltdl_include],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
269 [AS_HELP_STRING([--with-ltdl-include=DIR],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
270 [use the ltdl headers installed in DIR])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
271
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
272 if test -n "$with_ltdl_include"; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
273 if test -f "$with_ltdl_include/ltdl.h"; then :
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
274 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
275 AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
276 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
277 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
278 with_ltdl_include=no
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
279 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
280
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
281 AC_ARG_WITH([ltdl_lib],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
282 [AS_HELP_STRING([--with-ltdl-lib=DIR],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
283 [use the libltdl.la installed in DIR])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
284
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
285 if test -n "$with_ltdl_lib"; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
286 if test -f "$with_ltdl_lib/libltdl.la"; then :
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
287 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
288 AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
289 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
290 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
291 with_ltdl_lib=no
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
292 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
293
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
294 case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
295 ,yes,no,no,)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
296 m4_case(m4_default(_LTDL_TYPE, [convenience]),
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
297 [convenience], [_LTDL_CONVENIENCE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
298 [installable], [_LTDL_INSTALLABLE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
299 [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
300 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
301 ,no,no,no,)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
302 # If the included ltdl is not to be used, then use the
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
303 # preinstalled libltdl we found.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
304 AC_DEFINE([HAVE_LTDL], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
305 [Define this if a modern libltdl is already installed])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
306 LIBLTDL=-lltdl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
307 LTDLDEPS=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
308 LTDLINCL=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
309 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
310 ,no*,no,*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
311 AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
312 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
313 *) with_included_ltdl=no
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
314 LIBLTDL="-L$with_ltdl_lib -lltdl"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
315 LTDLDEPS=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
316 LTDLINCL="-I$with_ltdl_include"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
317 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
318 esac
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
319 INCLTDL="$LTDLINCL"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
320
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
321 # Report our decision...
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
322 AC_MSG_CHECKING([where to find libltdl headers])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
323 AC_MSG_RESULT([$LTDLINCL])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
324 AC_MSG_CHECKING([where to find libltdl library])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
325 AC_MSG_RESULT([$LIBLTDL])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
326
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
327 _LTDL_SETUP
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
328
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
329 dnl restore autoconf definition.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
330 m4_popdef([AC_LIBOBJ])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
331 m4_popdef([AC_LIBSOURCES])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
332
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
333 AC_CONFIG_COMMANDS_PRE([
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
334 _ltdl_libobjs=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
335 _ltdl_ltlibobjs=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
336 if test -n "$_LT_LIBOBJS"; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
337 # Remove the extension.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
338 _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
339 for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
340 _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
341 _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
342 done
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
343 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
344 AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
345 AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
346 ])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
347
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
348 # Only expand once:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
349 m4_define([LTDL_INIT])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
350 ])# LTDL_INIT
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
351
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
352 # Old names:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
353 AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
354 AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
355 AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
356 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
357 dnl AC_DEFUN([AC_LIB_LTDL], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
358 dnl AC_DEFUN([AC_WITH_LTDL], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
359 dnl AC_DEFUN([LT_WITH_LTDL], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
360
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
361
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
362 # _LTDL_SETUP
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
363 # -----------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
364 # Perform all the checks necessary for compilation of the ltdl objects
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
365 # -- including compiler checks and header checks. This is a public
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
366 # interface mainly for the benefit of libltdl's own configure.ac, most
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
367 # other users should call LTDL_INIT instead.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
368 AC_DEFUN([_LTDL_SETUP],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
369 [AC_REQUIRE([AC_PROG_CC])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
370 AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
371 AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
372 AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
373 AC_REQUIRE([LT_LIB_DLLOAD])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
374 AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
375 AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
376 AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
377 AC_REQUIRE([gl_FUNC_ARGZ])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
378
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
379 m4_require([_LT_CHECK_OBJDIR])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
380 m4_require([_LT_HEADER_DLFCN])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
381 m4_require([_LT_CHECK_DLPREOPEN])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
382 m4_require([_LT_DECL_SED])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
383
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
384 dnl Don't require this, or it will be expanded earlier than the code
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
385 dnl that sets the variables it relies on:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
386 _LT_ENABLE_INSTALL
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
387
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
388 dnl _LTDL_MODE specific code must be called at least once:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
389 _LTDL_MODE_DISPATCH
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
390
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
391 # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
392 # the user used. This is so that ltdl.h can pick up the parent projects
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
393 # config.h file, The first file in AC_CONFIG_HEADERS must contain the
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
394 # definitions required by ltdl.c.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
395 # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
396 AC_CONFIG_COMMANDS_PRE([dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
397 m4_pattern_allow([^LT_CONFIG_H$])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
398 m4_ifset([AH_HEADER],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
399 [LT_CONFIG_H=AH_HEADER],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
400 [m4_ifset([AC_LIST_HEADERS],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
401 [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
402 [])])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
403 AC_SUBST([LT_CONFIG_H])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
404
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
405 AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
406 [], [], [AC_INCLUDES_DEFAULT])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
407
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
408 AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
409 AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
410
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
411 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
412
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
413 name=ltdl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
414 LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
415 AC_SUBST([LTDLOPEN])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
416 ])# _LTDL_SETUP
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
417
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
418
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
419 # _LT_ENABLE_INSTALL
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
420 # ------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
421 m4_define([_LT_ENABLE_INSTALL],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
422 [AC_ARG_ENABLE([ltdl-install],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
423 [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
424
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
425 case ,${enable_ltdl_install},${enable_ltdl_convenience} in
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
426 *yes*) ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
427 *) enable_ltdl_convenience=yes ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
428 esac
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
429
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
430 m4_ifdef([AM_CONDITIONAL],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
431 [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
432 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
433 ])# _LT_ENABLE_INSTALL
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
434
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
435
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
436 # LT_SYS_DLOPEN_DEPLIBS
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
437 # ---------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
438 AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
439 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
440 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
441 [lt_cv_sys_dlopen_deplibs],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
442 [# PORTME does your system automatically load deplibs for dlopen?
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
443 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
444 # For now, we just catch OSes we know something about -- in the
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
445 # future, we'll try test this programmatically.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
446 lt_cv_sys_dlopen_deplibs=unknown
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
447 case $host_os in
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
448 aix3*|aix4.1.*|aix4.2.*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
449 # Unknown whether this is true for these versions of AIX, but
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
450 # we want this `case' here to explicitly catch those versions.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
451 lt_cv_sys_dlopen_deplibs=unknown
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
452 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
453 aix[[4-9]]*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
454 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
455 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
456 amigaos*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
457 case $host_cpu in
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
458 powerpc)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
459 lt_cv_sys_dlopen_deplibs=no
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
460 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
461 esac
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
462 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
463 darwin*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
464 # Assuming the user has installed a libdl from somewhere, this is true
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
465 # If you are looking for one http://www.opendarwin.org/projects/dlcompat
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
466 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
467 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
468 freebsd* | dragonfly*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
469 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
470 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
471 gnu* | linux* | k*bsd*-gnu)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
472 # GNU and its variants, using gnu ld.so (Glibc)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
473 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
474 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
475 hpux10*|hpux11*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
476 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
477 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
478 interix*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
479 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
480 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
481 irix[[12345]]*|irix6.[[01]]*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
482 # Catch all versions of IRIX before 6.2, and indicate that we don't
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
483 # know how it worked for any of those versions.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
484 lt_cv_sys_dlopen_deplibs=unknown
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
485 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
486 irix*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
487 # The case above catches anything before 6.2, and it's known that
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
488 # at 6.2 and later dlopen does load deplibs.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
489 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
490 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
491 netbsd*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
492 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
493 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
494 openbsd*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
495 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
496 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
497 osf[[1234]]*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
498 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
499 # it did *not* use an RPATH in a shared library to find objects the
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
500 # library depends on, so we explicitly say `no'.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
501 lt_cv_sys_dlopen_deplibs=no
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
502 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
503 osf5.0|osf5.0a|osf5.1)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
504 # dlopen *does* load deplibs and with the right loader patch applied
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
505 # it even uses RPATH in a shared library to search for shared objects
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
506 # that the library depends on, but there's no easy way to know if that
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
507 # patch is installed. Since this is the case, all we can really
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
508 # say is unknown -- it depends on the patch being installed. If
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
509 # it is, this changes to `yes'. Without it, it would be `no'.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
510 lt_cv_sys_dlopen_deplibs=unknown
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
511 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
512 osf*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
513 # the two cases above should catch all versions of osf <= 5.1. Read
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
514 # the comments above for what we know about them.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
515 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
516 # is used to find them so we can finally say `yes'.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
517 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
518 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
519 qnx*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
520 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
521 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
522 solaris*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
523 lt_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
524 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
525 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
526 libltdl_cv_sys_dlopen_deplibs=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
527 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
528 esac
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
529 ])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
530 if test "$lt_cv_sys_dlopen_deplibs" != yes; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
531 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
532 [Define if the OS needs help to load dependent libraries for dlopen().])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
533 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
534 ])# LT_SYS_DLOPEN_DEPLIBS
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
535
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
536 # Old name:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
537 AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
538 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
539 dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
540
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
541
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
542 # LT_SYS_MODULE_EXT
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
543 # -----------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
544 AC_DEFUN([LT_SYS_MODULE_EXT],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
545 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
546 AC_CACHE_CHECK([which extension is used for runtime loadable modules],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
547 [libltdl_cv_shlibext],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
548 [
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
549 module=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
550 eval libltdl_cv_shlibext=$shrext_cmds
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
551 ])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
552 if test -n "$libltdl_cv_shlibext"; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
553 m4_pattern_allow([LT_MODULE_EXT])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
554 AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
555 [Define to the extension used for runtime loadable modules, say, ".so".])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
556 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
557 ])# LT_SYS_MODULE_EXT
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
558
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
559 # Old name:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
560 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
561 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
562 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
563
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
564
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
565 # LT_SYS_MODULE_PATH
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
566 # ------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
567 AC_DEFUN([LT_SYS_MODULE_PATH],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
568 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
569 AC_CACHE_CHECK([which variable specifies run-time module search path],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
570 [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
571 if test -n "$lt_cv_module_path_var"; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
572 m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
573 AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
574 [Define to the name of the environment variable that determines the run-time module search path.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
575 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
576 ])# LT_SYS_MODULE_PATH
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
577
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
578 # Old name:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
579 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
580 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
581 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
582
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
583
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
584 # LT_SYS_DLSEARCH_PATH
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
585 # --------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
586 AC_DEFUN([LT_SYS_DLSEARCH_PATH],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
587 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
588 AC_CACHE_CHECK([for the default library search path],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
589 [lt_cv_sys_dlsearch_path],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
590 [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
591 if test -n "$lt_cv_sys_dlsearch_path"; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
592 sys_dlsearch_path=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
593 for dir in $lt_cv_sys_dlsearch_path; do
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
594 if test -z "$sys_dlsearch_path"; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
595 sys_dlsearch_path="$dir"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
596 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
597 sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
598 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
599 done
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
600 m4_pattern_allow([LT_DLSEARCH_PATH])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
601 AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
602 [Define to the system default library search path.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
603 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
604 ])# LT_SYS_DLSEARCH_PATH
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
605
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
606 # Old name:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
607 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
608 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
609 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
610
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
611
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
612 # _LT_CHECK_DLPREOPEN
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
613 # -------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
614 m4_defun([_LT_CHECK_DLPREOPEN],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
615 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
616 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
617 [libltdl_cv_preloaded_symbols],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
618 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
619 libltdl_cv_preloaded_symbols=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
620 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
621 libltdl_cv_preloaded_symbols=no
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
622 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
623 ])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
624 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
625 AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
626 [Define if libtool can extract symbol lists from object files.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
627 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
628 ])# _LT_CHECK_DLPREOPEN
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
629
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
630
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
631 # LT_LIB_DLLOAD
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
632 # -------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
633 AC_DEFUN([LT_LIB_DLLOAD],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
634 [m4_pattern_allow([^LT_DLLOADERS$])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
635 LT_DLLOADERS=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
636 AC_SUBST([LT_DLLOADERS])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
637
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
638 AC_LANG_PUSH([C])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
639
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
640 LIBADD_DLOPEN=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
641 AC_SEARCH_LIBS([dlopen], [dl],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
642 [AC_DEFINE([HAVE_LIBDL], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
643 [Define if you have the libdl library or equivalent.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
644 if test "$ac_cv_search_dlopen" != "none required" ; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
645 LIBADD_DLOPEN="-ldl"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
646 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
647 libltdl_cv_lib_dl_dlopen="yes"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
648 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
649 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
650 # include <dlfcn.h>
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
651 #endif
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
652 ]], [[dlopen(0, 0);]])],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
653 [AC_DEFINE([HAVE_LIBDL], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
654 [Define if you have the libdl library or equivalent.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
655 libltdl_cv_func_dlopen="yes"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
656 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
657 [AC_CHECK_LIB([svld], [dlopen],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
658 [AC_DEFINE([HAVE_LIBDL], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
659 [Define if you have the libdl library or equivalent.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
660 LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
661 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
662 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
663 then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
664 lt_save_LIBS="$LIBS"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
665 LIBS="$LIBS $LIBADD_DLOPEN"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
666 AC_CHECK_FUNCS([dlerror])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
667 LIBS="$lt_save_LIBS"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
668 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
669 AC_SUBST([LIBADD_DLOPEN])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
670
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
671 LIBADD_SHL_LOAD=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
672 AC_CHECK_FUNC([shl_load],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
673 [AC_DEFINE([HAVE_SHL_LOAD], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
674 [Define if you have the shl_load function.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
675 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
676 [AC_CHECK_LIB([dld], [shl_load],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
677 [AC_DEFINE([HAVE_SHL_LOAD], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
678 [Define if you have the shl_load function.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
679 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
680 LIBADD_SHL_LOAD="-ldld"])])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
681 AC_SUBST([LIBADD_SHL_LOAD])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
682
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
683 case $host_os in
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
684 darwin[[1567]].*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
685 # We only want this for pre-Mac OS X 10.4.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
686 AC_CHECK_FUNC([_dyld_func_lookup],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
687 [AC_DEFINE([HAVE_DYLD], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
688 [Define if you have the _dyld_func_lookup function.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
689 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
690 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
691 beos*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
692 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
693 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
694 cygwin* | mingw* | os2* | pw32*)
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
695 AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
696 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
697 ;;
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
698 esac
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
699
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
700 AC_CHECK_LIB([dld], [dld_link],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
701 [AC_DEFINE([HAVE_DLD], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
702 [Define if you have the GNU dld library.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
703 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
704 AC_SUBST([LIBADD_DLD_LINK])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
705
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
706 m4_pattern_allow([^LT_DLPREOPEN$])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
707 LT_DLPREOPEN=
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
708 if test -n "$LT_DLLOADERS"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
709 then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
710 for lt_loader in $LT_DLLOADERS; do
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
711 LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
712 done
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
713 AC_DEFINE([HAVE_LIBDLLOADER], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
714 [Define if libdlloader will be built on this platform])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
715 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
716 AC_SUBST([LT_DLPREOPEN])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
717
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
718 dnl This isn't used anymore, but set it for backwards compatibility
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
719 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
720 AC_SUBST([LIBADD_DL])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
721
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
722 AC_LANG_POP
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
723 ])# LT_LIB_DLLOAD
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
724
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
725 # Old name:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
726 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
727 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
728 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
729
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
730
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
731 # LT_SYS_SYMBOL_USCORE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
732 # --------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
733 # does the compiler prefix global symbols with an underscore?
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
734 AC_DEFUN([LT_SYS_SYMBOL_USCORE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
735 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
736 AC_CACHE_CHECK([for _ prefix in compiled symbols],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
737 [lt_cv_sys_symbol_underscore],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
738 [lt_cv_sys_symbol_underscore=no
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
739 cat > conftest.$ac_ext <<_LT_EOF
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
740 void nm_test_func(){}
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
741 int main(){nm_test_func;return 0;}
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
742 _LT_EOF
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
743 if AC_TRY_EVAL(ac_compile); then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
744 # Now try to grab the symbols.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
745 ac_nlist=conftest.nm
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
746 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
747 # See whether the symbols have a leading underscore.
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
748 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
749 lt_cv_sys_symbol_underscore=yes
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
750 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
751 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
752 :
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
753 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
754 echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
755 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
756 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
757 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
758 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
759 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
760 else
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
761 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
762 cat conftest.c >&AS_MESSAGE_LOG_FD
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
763 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
764 rm -rf conftest*
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
765 ])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
766 sys_symbol_underscore=$lt_cv_sys_symbol_underscore
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
767 AC_SUBST([sys_symbol_underscore])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
768 ])# LT_SYS_SYMBOL_USCORE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
769
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
770 # Old name:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
771 AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
772 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
773 dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
774
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
775
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
776 # LT_FUNC_DLSYM_USCORE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
777 # --------------------
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
778 AC_DEFUN([LT_FUNC_DLSYM_USCORE],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
779 [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
780 if test x"$lt_cv_sys_symbol_underscore" = xyes; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
781 if test x"$libltdl_cv_func_dlopen" = xyes ||
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
782 test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
783 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
784 [libltdl_cv_need_uscore],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
785 [libltdl_cv_need_uscore=unknown
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
786 save_LIBS="$LIBS"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
787 LIBS="$LIBS $LIBADD_DLOPEN"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
788 _LT_TRY_DLOPEN_SELF(
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
789 [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
790 [], [libltdl_cv_need_uscore=cross])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
791 LIBS="$save_LIBS"
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
792 ])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
793 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
794 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
795
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
796 if test x"$libltdl_cv_need_uscore" = xyes; then
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
797 AC_DEFINE([NEED_USCORE], [1],
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
798 [Define if dlsym() requires a leading underscore in symbol names.])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
799 fi
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
800 ])# LT_FUNC_DLSYM_USCORE
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
801
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
802 # Old name:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
803 AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
804 dnl aclocal-1.4 backwards compatibility:
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
805 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
3da232c5980a Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
806