| Line 23... |
Line 23... |
| 23 |
])
|
23 |
])
|
| 24 |
|
24 |
|
| 25 |
dnl From libtool-1.4. Sets the variable LD.
|
25 |
dnl From libtool-1.4. Sets the variable LD.
|
| 26 |
AC_DEFUN([AC_LIB_PROG_LD],
|
26 |
AC_DEFUN([AC_LIB_PROG_LD],
|
| 27 |
[AC_ARG_WITH(gnu-ld,
|
27 |
[AC_ARG_WITH(gnu-ld,
|
| 28 |
[AS_HELP_STRING([--with-gnu-ld],
|
28 |
[AS_HELP_STRING([--with-gnu-ld],
|
| 29 |
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
|
29 |
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
|
| 30 |
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
30 |
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
| 31 |
AC_REQUIRE([AC_PROG_CC])dnl
|
31 |
AC_REQUIRE([AC_PROG_CC])dnl
|
| 32 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
32 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
| 33 |
# Prepare PATH_SEPARATOR.
|
33 |
# Prepare PATH_SEPARATOR.
|
| Line 125... |
Line 125... |
| 125 |
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
125 |
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
| 126 |
dnl augments the CPPFLAGS variable.
|
126 |
dnl augments the CPPFLAGS variable.
|
| 127 |
AC_DEFUN([AC_LIB_LINKFLAGS],
|
127 |
AC_DEFUN([AC_LIB_LINKFLAGS],
|
| 128 |
[
|
128 |
[
|
| 129 |
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
129 |
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
| 130 |
AC_REQUIRE([AC_LIB_RPATH])
|
130 |
dnl AC_REQUIRE([AC_LIB_RPATH])
|
| 131 |
define([Name],[translit([$1],[./-], [___])])
|
131 |
define([Name],[translit([$1],[./-], [___])])
|
| 132 |
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
132 |
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
| 133 |
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
133 |
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
| 134 |
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
134 |
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
| 135 |
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
135 |
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
| Line 159... |
Line 159... |
| 159 |
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
159 |
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
| 160 |
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
160 |
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
| 161 |
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
161 |
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
| 162 |
[
|
162 |
[
|
| 163 |
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
163 |
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
| 164 |
AC_REQUIRE([AC_LIB_RPATH])
|
164 |
dnl AC_REQUIRE([AC_LIB_RPATH])
|
| 165 |
define([Name],[translit([$1],[./-], [___])])
|
165 |
define([Name],[translit([$1],[./-], [___])])
|
| 166 |
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
166 |
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
| 167 |
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
167 |
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
| 168 |
|
168 |
|
| 169 |
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
169 |
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
| Line 208... |
Line 208... |
| 208 |
AC_DEFUN([AC_LIB_RPATH],
|
208 |
AC_DEFUN([AC_LIB_RPATH],
|
| 209 |
[
|
209 |
[
|
| 210 |
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
210 |
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
| 211 |
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
211 |
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
| 212 |
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
212 |
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
| 213 |
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
213 |
dnl AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
| 214 |
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
214 |
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
| 215 |
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
215 |
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
| 216 |
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
216 |
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
| 217 |
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
217 |
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
| 218 |
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
218 |
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
| Line 226... |
Line 226... |
| 226 |
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
226 |
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
| 227 |
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
227 |
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
| 228 |
hardcode_direct="$acl_cv_hardcode_direct"
|
228 |
hardcode_direct="$acl_cv_hardcode_direct"
|
| 229 |
hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
229 |
hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
| 230 |
dnl Determine whether the user wants rpath handling at all.
|
230 |
dnl Determine whether the user wants rpath handling at all.
|
| 231 |
AC_ARG_ENABLE(rpath,
|
231 |
dnl AC_ARG_ENABLE(rpath,
|
| 232 |
[ --disable-rpath do not hardcode runtime library paths],
|
232 |
dnl [ --disable-rpath do not hardcode runtime library paths],
|
| 233 |
:, enable_rpath=yes)
|
233 |
dnl :, enable_rpath=yes)
|
| 234 |
])
|
234 |
])
|
| 235 |
|
235 |
|
| 236 |
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
236 |
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
| 237 |
dnl the libraries corresponding to explicit and implicit dependencies.
|
237 |
dnl the libraries corresponding to explicit and implicit dependencies.
|
| 238 |
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
238 |
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|