Paolo Bonzini | 4f4e53dd | 2004-05-24 10:50:45 +0000 | [diff] [blame^] | 1 | # generated automatically by aclocal 1.8.4 -*- Autoconf -*- |
| 2 | |
| 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
| 4 | # Free Software Foundation, Inc. |
| 5 | # This file is free software; the Free Software Foundation |
| 6 | # gives unlimited permission to copy and/or distribute it, |
| 7 | # with or without modifications, as long as this notice is preserved. |
| 8 | |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 12 | # PARTICULAR PURPOSE. |
| 13 | |
| 14 | # codeset.m4 serial AM1 (gettext-0.10.40) |
| 15 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. |
| 16 | dnl This file is free software, distributed under the terms of the GNU |
| 17 | dnl General Public License. As a special exception to the GNU General |
| 18 | dnl Public License, this file may be distributed as part of a program |
| 19 | dnl that contains a configuration script generated by Autoconf, under |
| 20 | dnl the same distribution terms as the rest of that program. |
| 21 | |
| 22 | dnl From Bruno Haible. |
| 23 | |
| 24 | AC_DEFUN([AM_LANGINFO_CODESET], |
| 25 | [ |
| 26 | AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, |
| 27 | [AC_TRY_LINK([#include <langinfo.h>], |
| 28 | [char* cs = nl_langinfo(CODESET);], |
| 29 | am_cv_langinfo_codeset=yes, |
| 30 | am_cv_langinfo_codeset=no) |
| 31 | ]) |
| 32 | if test $am_cv_langinfo_codeset = yes; then |
| 33 | AC_DEFINE(HAVE_LANGINFO_CODESET, 1, |
| 34 | [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) |
| 35 | fi |
| 36 | ]) |
| 37 | |
| 38 | # iconv.m4 serial AM4 (gettext-0.11.3) |
| 39 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. |
| 40 | dnl This file is free software, distributed under the terms of the GNU |
| 41 | dnl General Public License. As a special exception to the GNU General |
| 42 | dnl Public License, this file may be distributed as part of a program |
| 43 | dnl that contains a configuration script generated by Autoconf, under |
| 44 | dnl the same distribution terms as the rest of that program. |
| 45 | |
| 46 | dnl From Bruno Haible. |
| 47 | |
| 48 | AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], |
| 49 | [ |
| 50 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. |
| 51 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
| 52 | AC_REQUIRE([AC_LIB_RPATH]) |
| 53 | |
| 54 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV |
| 55 | dnl accordingly. |
| 56 | AC_LIB_LINKFLAGS_BODY([iconv]) |
| 57 | ]) |
| 58 | |
| 59 | AC_DEFUN([AM_ICONV_LINK], |
| 60 | [ |
| 61 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and |
| 62 | dnl those with the standalone portable GNU libiconv installed). |
| 63 | |
| 64 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV |
| 65 | dnl accordingly. |
| 66 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
| 67 | |
| 68 | dnl Add $INCICONV to CPPFLAGS before performing the following checks, |
| 69 | dnl because if the user has installed libiconv and not disabled its use |
| 70 | dnl via --without-libiconv-prefix, he wants to use it. The first |
| 71 | dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. |
| 72 | am_save_CPPFLAGS="$CPPFLAGS" |
| 73 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) |
| 74 | |
| 75 | AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
| 76 | am_cv_func_iconv="no, consider installing GNU libiconv" |
| 77 | am_cv_lib_iconv=no |
| 78 | AC_TRY_LINK([#include <stdlib.h> |
| 79 | #include <iconv.h>], |
| 80 | [iconv_t cd = iconv_open("",""); |
| 81 | iconv(cd,NULL,NULL,NULL,NULL); |
| 82 | iconv_close(cd);], |
| 83 | am_cv_func_iconv=yes) |
| 84 | if test "$am_cv_func_iconv" != yes; then |
| 85 | am_save_LIBS="$LIBS" |
| 86 | LIBS="$LIBS $LIBICONV" |
| 87 | AC_TRY_LINK([#include <stdlib.h> |
| 88 | #include <iconv.h>], |
| 89 | [iconv_t cd = iconv_open("",""); |
| 90 | iconv(cd,NULL,NULL,NULL,NULL); |
| 91 | iconv_close(cd);], |
| 92 | am_cv_lib_iconv=yes |
| 93 | am_cv_func_iconv=yes) |
| 94 | LIBS="$am_save_LIBS" |
| 95 | fi |
| 96 | ]) |
| 97 | if test "$am_cv_func_iconv" = yes; then |
| 98 | AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) |
| 99 | fi |
| 100 | if test "$am_cv_lib_iconv" = yes; then |
| 101 | AC_MSG_CHECKING([how to link with libiconv]) |
| 102 | AC_MSG_RESULT([$LIBICONV]) |
| 103 | else |
| 104 | dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV |
| 105 | dnl either. |
| 106 | CPPFLAGS="$am_save_CPPFLAGS" |
| 107 | LIBICONV= |
| 108 | LTLIBICONV= |
| 109 | fi |
| 110 | AC_SUBST(LIBICONV) |
| 111 | AC_SUBST(LTLIBICONV) |
| 112 | ]) |
| 113 | |
| 114 | AC_DEFUN([AM_ICONV], |
| 115 | [ |
| 116 | AM_ICONV_LINK |
| 117 | if test "$am_cv_func_iconv" = yes; then |
| 118 | AC_MSG_CHECKING([for iconv declaration]) |
| 119 | AC_CACHE_VAL(am_cv_proto_iconv, [ |
| 120 | AC_TRY_COMPILE([ |
| 121 | #include <stdlib.h> |
| 122 | #include <iconv.h> |
| 123 | extern |
| 124 | #ifdef __cplusplus |
| 125 | "C" |
| 126 | #endif |
| 127 | #if defined(__STDC__) || defined(__cplusplus) |
| 128 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); |
| 129 | #else |
| 130 | size_t iconv(); |
| 131 | #endif |
| 132 | ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") |
| 133 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) |
| 134 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
| 135 | AC_MSG_RESULT([$]{ac_t:- |
| 136 | }[$]am_cv_proto_iconv) |
| 137 | AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, |
| 138 | [Define as const if the declaration of iconv() needs const.]) |
| 139 | fi |
| 140 | ]) |
| 141 | |
| 142 | # lib-ld.m4 serial 3 (gettext-0.13) |
| 143 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. |
| 144 | dnl This file is free software, distributed under the terms of the GNU |
| 145 | dnl General Public License. As a special exception to the GNU General |
| 146 | dnl Public License, this file may be distributed as part of a program |
| 147 | dnl that contains a configuration script generated by Autoconf, under |
| 148 | dnl the same distribution terms as the rest of that program. |
| 149 | |
| 150 | dnl Subroutines of libtool.m4, |
| 151 | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision |
| 152 | dnl with libtool.m4. |
| 153 | |
| 154 | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. |
| 155 | AC_DEFUN([AC_LIB_PROG_LD_GNU], |
| 156 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, |
| 157 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
| 158 | case `$LD -v 2>&1 </dev/null` in |
| 159 | *GNU* | *'with BFD'*) |
| 160 | acl_cv_prog_gnu_ld=yes ;; |
| 161 | *) |
| 162 | acl_cv_prog_gnu_ld=no ;; |
| 163 | esac]) |
| 164 | with_gnu_ld=$acl_cv_prog_gnu_ld |
| 165 | ]) |
| 166 | |
| 167 | dnl From libtool-1.4. Sets the variable LD. |
| 168 | AC_DEFUN([AC_LIB_PROG_LD], |
| 169 | [AC_ARG_WITH(gnu-ld, |
| 170 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
| 171 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
| 172 | AC_REQUIRE([AC_PROG_CC])dnl |
| 173 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 174 | # Prepare PATH_SEPARATOR. |
| 175 | # The user is always right. |
| 176 | if test "${PATH_SEPARATOR+set}" != set; then |
| 177 | echo "#! /bin/sh" >conf$$.sh |
| 178 | echo "exit 0" >>conf$$.sh |
| 179 | chmod +x conf$$.sh |
| 180 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then |
| 181 | PATH_SEPARATOR=';' |
| 182 | else |
| 183 | PATH_SEPARATOR=: |
| 184 | fi |
| 185 | rm -f conf$$.sh |
| 186 | fi |
| 187 | ac_prog=ld |
| 188 | if test "$GCC" = yes; then |
| 189 | # Check if gcc -print-prog-name=ld gives a path. |
| 190 | AC_MSG_CHECKING([for ld used by GCC]) |
| 191 | case $host in |
| 192 | *-*-mingw*) |
| 193 | # gcc leaves a trailing carriage return which upsets mingw |
| 194 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
| 195 | *) |
| 196 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
| 197 | esac |
| 198 | case $ac_prog in |
| 199 | # Accept absolute paths. |
| 200 | [[\\/]* | [A-Za-z]:[\\/]*)] |
| 201 | [re_direlt='/[^/][^/]*/\.\./'] |
| 202 | # Canonicalize the path of ld |
| 203 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
| 204 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
| 205 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
| 206 | done |
| 207 | test -z "$LD" && LD="$ac_prog" |
| 208 | ;; |
| 209 | "") |
| 210 | # If it fails, then pretend we aren't using GCC. |
| 211 | ac_prog=ld |
| 212 | ;; |
| 213 | *) |
| 214 | # If it is relative, then search for the first ld in PATH. |
| 215 | with_gnu_ld=unknown |
| 216 | ;; |
| 217 | esac |
| 218 | elif test "$with_gnu_ld" = yes; then |
| 219 | AC_MSG_CHECKING([for GNU ld]) |
| 220 | else |
| 221 | AC_MSG_CHECKING([for non-GNU ld]) |
| 222 | fi |
| 223 | AC_CACHE_VAL(acl_cv_path_LD, |
| 224 | [if test -z "$LD"; then |
| 225 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
| 226 | for ac_dir in $PATH; do |
| 227 | test -z "$ac_dir" && ac_dir=. |
| 228 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
| 229 | acl_cv_path_LD="$ac_dir/$ac_prog" |
| 230 | # Check to see if the program is GNU ld. I'd rather use --version, |
| 231 | # but apparently some GNU ld's only accept -v. |
| 232 | # Break only if it was the GNU/non-GNU ld that we prefer. |
| 233 | case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in |
| 234 | *GNU* | *'with BFD'*) |
| 235 | test "$with_gnu_ld" != no && break ;; |
| 236 | *) |
| 237 | test "$with_gnu_ld" != yes && break ;; |
| 238 | esac |
| 239 | fi |
| 240 | done |
| 241 | IFS="$ac_save_ifs" |
| 242 | else |
| 243 | acl_cv_path_LD="$LD" # Let the user override the test with a path. |
| 244 | fi]) |
| 245 | LD="$acl_cv_path_LD" |
| 246 | if test -n "$LD"; then |
| 247 | AC_MSG_RESULT($LD) |
| 248 | else |
| 249 | AC_MSG_RESULT(no) |
| 250 | fi |
| 251 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
| 252 | AC_LIB_PROG_LD_GNU |
| 253 | ]) |
| 254 | |
| 255 | # lib-link.m4 serial 4 (gettext-0.12) |
| 256 | dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. |
| 257 | dnl This file is free software, distributed under the terms of the GNU |
| 258 | dnl General Public License. As a special exception to the GNU General |
| 259 | dnl Public License, this file may be distributed as part of a program |
| 260 | dnl that contains a configuration script generated by Autoconf, under |
| 261 | dnl the same distribution terms as the rest of that program. |
| 262 | |
| 263 | dnl From Bruno Haible. |
| 264 | |
| 265 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
| 266 | dnl the libraries corresponding to explicit and implicit dependencies. |
| 267 | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and |
| 268 | dnl augments the CPPFLAGS variable. |
| 269 | AC_DEFUN([AC_LIB_LINKFLAGS], |
| 270 | [ |
| 271 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
| 272 | AC_REQUIRE([AC_LIB_RPATH]) |
| 273 | define([Name],[translit([$1],[./-], [___])]) |
| 274 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
| 275 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
| 276 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
| 277 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
| 278 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
| 279 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
| 280 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
| 281 | ]) |
| 282 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
| 283 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
| 284 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
| 285 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
| 286 | AC_SUBST([LIB]NAME) |
| 287 | AC_SUBST([LTLIB]NAME) |
| 288 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
| 289 | dnl results of this search when this library appears as a dependency. |
| 290 | HAVE_LIB[]NAME=yes |
| 291 | undefine([Name]) |
| 292 | undefine([NAME]) |
| 293 | ]) |
| 294 | |
| 295 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) |
| 296 | dnl searches for libname and the libraries corresponding to explicit and |
| 297 | dnl implicit dependencies, together with the specified include files and |
| 298 | dnl the ability to compile and link the specified testcode. If found, it |
| 299 | dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and |
| 300 | dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and |
| 301 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
| 302 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
| 303 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
| 304 | [ |
| 305 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
| 306 | AC_REQUIRE([AC_LIB_RPATH]) |
| 307 | define([Name],[translit([$1],[./-], [___])]) |
| 308 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
| 309 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
| 310 | |
| 311 | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
| 312 | dnl accordingly. |
| 313 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
| 314 | |
| 315 | dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, |
| 316 | dnl because if the user has installed lib[]Name and not disabled its use |
| 317 | dnl via --without-lib[]Name-prefix, he wants to use it. |
| 318 | ac_save_CPPFLAGS="$CPPFLAGS" |
| 319 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
| 320 | |
| 321 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
| 322 | ac_save_LIBS="$LIBS" |
| 323 | LIBS="$LIBS $LIB[]NAME" |
| 324 | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
| 325 | LIBS="$ac_save_LIBS" |
| 326 | ]) |
| 327 | if test "$ac_cv_lib[]Name" = yes; then |
| 328 | HAVE_LIB[]NAME=yes |
| 329 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
| 330 | AC_MSG_CHECKING([how to link with lib[]$1]) |
| 331 | AC_MSG_RESULT([$LIB[]NAME]) |
| 332 | else |
| 333 | HAVE_LIB[]NAME=no |
| 334 | dnl If $LIB[]NAME didn't lead to a usable library, we don't need |
| 335 | dnl $INC[]NAME either. |
| 336 | CPPFLAGS="$ac_save_CPPFLAGS" |
| 337 | LIB[]NAME= |
| 338 | LTLIB[]NAME= |
| 339 | fi |
| 340 | AC_SUBST([HAVE_LIB]NAME) |
| 341 | AC_SUBST([LIB]NAME) |
| 342 | AC_SUBST([LTLIB]NAME) |
| 343 | undefine([Name]) |
| 344 | undefine([NAME]) |
| 345 | ]) |
| 346 | |
| 347 | dnl Determine the platform dependent parameters needed to use rpath: |
| 348 | dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, |
| 349 | dnl hardcode_direct, hardcode_minus_L. |
| 350 | AC_DEFUN([AC_LIB_RPATH], |
| 351 | [ |
| 352 | AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS |
| 353 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
| 354 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
| 355 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
| 356 | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ |
| 357 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
| 358 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
| 359 | . ./conftest.sh |
| 360 | rm -f ./conftest.sh |
| 361 | acl_cv_rpath=done |
| 362 | ]) |
| 363 | wl="$acl_cv_wl" |
| 364 | libext="$acl_cv_libext" |
| 365 | shlibext="$acl_cv_shlibext" |
| 366 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
| 367 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
| 368 | hardcode_direct="$acl_cv_hardcode_direct" |
| 369 | hardcode_minus_L="$acl_cv_hardcode_minus_L" |
| 370 | dnl Determine whether the user wants rpath handling at all. |
| 371 | AC_ARG_ENABLE(rpath, |
| 372 | [ --disable-rpath do not hardcode runtime library paths], |
| 373 | :, enable_rpath=yes) |
| 374 | ]) |
| 375 | |
| 376 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and |
| 377 | dnl the libraries corresponding to explicit and implicit dependencies. |
| 378 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
| 379 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
| 380 | [ |
| 381 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
| 382 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
| 383 | dnl By default, look in $includedir and $libdir. |
| 384 | use_additional=yes |
| 385 | AC_LIB_WITH_FINAL_PREFIX([ |
| 386 | eval additional_includedir=\"$includedir\" |
| 387 | eval additional_libdir=\"$libdir\" |
| 388 | ]) |
| 389 | AC_LIB_ARG_WITH([lib$1-prefix], |
| 390 | [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib |
| 391 | --without-lib$1-prefix don't search for lib$1 in includedir and libdir], |
| 392 | [ |
| 393 | if test "X$withval" = "Xno"; then |
| 394 | use_additional=no |
| 395 | else |
| 396 | if test "X$withval" = "X"; then |
| 397 | AC_LIB_WITH_FINAL_PREFIX([ |
| 398 | eval additional_includedir=\"$includedir\" |
| 399 | eval additional_libdir=\"$libdir\" |
| 400 | ]) |
| 401 | else |
| 402 | additional_includedir="$withval/include" |
| 403 | additional_libdir="$withval/lib" |
| 404 | fi |
| 405 | fi |
| 406 | ]) |
| 407 | dnl Search the library and its dependencies in $additional_libdir and |
| 408 | dnl $LDFLAGS. Using breadth-first-seach. |
| 409 | LIB[]NAME= |
| 410 | LTLIB[]NAME= |
| 411 | INC[]NAME= |
| 412 | rpathdirs= |
| 413 | ltrpathdirs= |
| 414 | names_already_handled= |
| 415 | names_next_round='$1 $2' |
| 416 | while test -n "$names_next_round"; do |
| 417 | names_this_round="$names_next_round" |
| 418 | names_next_round= |
| 419 | for name in $names_this_round; do |
| 420 | already_handled= |
| 421 | for n in $names_already_handled; do |
| 422 | if test "$n" = "$name"; then |
| 423 | already_handled=yes |
| 424 | break |
| 425 | fi |
| 426 | done |
| 427 | if test -z "$already_handled"; then |
| 428 | names_already_handled="$names_already_handled $name" |
| 429 | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
| 430 | dnl or AC_LIB_HAVE_LINKFLAGS call. |
| 431 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
| 432 | eval value=\"\$HAVE_LIB$uppername\" |
| 433 | if test -n "$value"; then |
| 434 | if test "$value" = yes; then |
| 435 | eval value=\"\$LIB$uppername\" |
| 436 | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
| 437 | eval value=\"\$LTLIB$uppername\" |
| 438 | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
| 439 | else |
| 440 | dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined |
| 441 | dnl that this library doesn't exist. So just drop it. |
| 442 | : |
| 443 | fi |
| 444 | else |
| 445 | dnl Search the library lib$name in $additional_libdir and $LDFLAGS |
| 446 | dnl and the already constructed $LIBNAME/$LTLIBNAME. |
| 447 | found_dir= |
| 448 | found_la= |
| 449 | found_so= |
| 450 | found_a= |
| 451 | if test $use_additional = yes; then |
| 452 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then |
| 453 | found_dir="$additional_libdir" |
| 454 | found_so="$additional_libdir/lib$name.$shlibext" |
| 455 | if test -f "$additional_libdir/lib$name.la"; then |
| 456 | found_la="$additional_libdir/lib$name.la" |
| 457 | fi |
| 458 | else |
| 459 | if test -f "$additional_libdir/lib$name.$libext"; then |
| 460 | found_dir="$additional_libdir" |
| 461 | found_a="$additional_libdir/lib$name.$libext" |
| 462 | if test -f "$additional_libdir/lib$name.la"; then |
| 463 | found_la="$additional_libdir/lib$name.la" |
| 464 | fi |
| 465 | fi |
| 466 | fi |
| 467 | fi |
| 468 | if test "X$found_dir" = "X"; then |
| 469 | for x in $LDFLAGS $LTLIB[]NAME; do |
| 470 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 471 | case "$x" in |
| 472 | -L*) |
| 473 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
| 474 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then |
| 475 | found_dir="$dir" |
| 476 | found_so="$dir/lib$name.$shlibext" |
| 477 | if test -f "$dir/lib$name.la"; then |
| 478 | found_la="$dir/lib$name.la" |
| 479 | fi |
| 480 | else |
| 481 | if test -f "$dir/lib$name.$libext"; then |
| 482 | found_dir="$dir" |
| 483 | found_a="$dir/lib$name.$libext" |
| 484 | if test -f "$dir/lib$name.la"; then |
| 485 | found_la="$dir/lib$name.la" |
| 486 | fi |
| 487 | fi |
| 488 | fi |
| 489 | ;; |
| 490 | esac |
| 491 | if test "X$found_dir" != "X"; then |
| 492 | break |
| 493 | fi |
| 494 | done |
| 495 | fi |
| 496 | if test "X$found_dir" != "X"; then |
| 497 | dnl Found the library. |
| 498 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
| 499 | if test "X$found_so" != "X"; then |
| 500 | dnl Linking with a shared library. We attempt to hardcode its |
| 501 | dnl directory into the executable's runpath, unless it's the |
| 502 | dnl standard /usr/lib. |
| 503 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
| 504 | dnl No hardcoding is needed. |
| 505 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
| 506 | else |
| 507 | dnl Use an explicit option to hardcode DIR into the resulting |
| 508 | dnl binary. |
| 509 | dnl Potentially add DIR to ltrpathdirs. |
| 510 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
| 511 | haveit= |
| 512 | for x in $ltrpathdirs; do |
| 513 | if test "X$x" = "X$found_dir"; then |
| 514 | haveit=yes |
| 515 | break |
| 516 | fi |
| 517 | done |
| 518 | if test -z "$haveit"; then |
| 519 | ltrpathdirs="$ltrpathdirs $found_dir" |
| 520 | fi |
| 521 | dnl The hardcoding into $LIBNAME is system dependent. |
| 522 | if test "$hardcode_direct" = yes; then |
| 523 | dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
| 524 | dnl resulting binary. |
| 525 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
| 526 | else |
| 527 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 528 | dnl Use an explicit option to hardcode DIR into the resulting |
| 529 | dnl binary. |
| 530 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
| 531 | dnl Potentially add DIR to rpathdirs. |
| 532 | dnl The rpathdirs will be appended to $LIBNAME at the end. |
| 533 | haveit= |
| 534 | for x in $rpathdirs; do |
| 535 | if test "X$x" = "X$found_dir"; then |
| 536 | haveit=yes |
| 537 | break |
| 538 | fi |
| 539 | done |
| 540 | if test -z "$haveit"; then |
| 541 | rpathdirs="$rpathdirs $found_dir" |
| 542 | fi |
| 543 | else |
| 544 | dnl Rely on "-L$found_dir". |
| 545 | dnl But don't add it if it's already contained in the LDFLAGS |
| 546 | dnl or the already constructed $LIBNAME |
| 547 | haveit= |
| 548 | for x in $LDFLAGS $LIB[]NAME; do |
| 549 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 550 | if test "X$x" = "X-L$found_dir"; then |
| 551 | haveit=yes |
| 552 | break |
| 553 | fi |
| 554 | done |
| 555 | if test -z "$haveit"; then |
| 556 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
| 557 | fi |
| 558 | if test "$hardcode_minus_L" != no; then |
| 559 | dnl FIXME: Not sure whether we should use |
| 560 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
| 561 | dnl here. |
| 562 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
| 563 | else |
| 564 | dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH |
| 565 | dnl here, because this doesn't fit in flags passed to the |
| 566 | dnl compiler. So give up. No hardcoding. This affects only |
| 567 | dnl very old systems. |
| 568 | dnl FIXME: Not sure whether we should use |
| 569 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
| 570 | dnl here. |
| 571 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
| 572 | fi |
| 573 | fi |
| 574 | fi |
| 575 | fi |
| 576 | else |
| 577 | if test "X$found_a" != "X"; then |
| 578 | dnl Linking with a static library. |
| 579 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
| 580 | else |
| 581 | dnl We shouldn't come here, but anyway it's good to have a |
| 582 | dnl fallback. |
| 583 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
| 584 | fi |
| 585 | fi |
| 586 | dnl Assume the include files are nearby. |
| 587 | additional_includedir= |
| 588 | case "$found_dir" in |
| 589 | */lib | */lib/) |
| 590 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
| 591 | additional_includedir="$basedir/include" |
| 592 | ;; |
| 593 | esac |
| 594 | if test "X$additional_includedir" != "X"; then |
| 595 | dnl Potentially add $additional_includedir to $INCNAME. |
| 596 | dnl But don't add it |
| 597 | dnl 1. if it's the standard /usr/include, |
| 598 | dnl 2. if it's /usr/local/include and we are using GCC on Linux, |
| 599 | dnl 3. if it's already present in $CPPFLAGS or the already |
| 600 | dnl constructed $INCNAME, |
| 601 | dnl 4. if it doesn't exist as a directory. |
| 602 | if test "X$additional_includedir" != "X/usr/include"; then |
| 603 | haveit= |
| 604 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 605 | if test -n "$GCC"; then |
| 606 | case $host_os in |
| 607 | linux*) haveit=yes;; |
| 608 | esac |
| 609 | fi |
| 610 | fi |
| 611 | if test -z "$haveit"; then |
| 612 | for x in $CPPFLAGS $INC[]NAME; do |
| 613 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 614 | if test "X$x" = "X-I$additional_includedir"; then |
| 615 | haveit=yes |
| 616 | break |
| 617 | fi |
| 618 | done |
| 619 | if test -z "$haveit"; then |
| 620 | if test -d "$additional_includedir"; then |
| 621 | dnl Really add $additional_includedir to $INCNAME. |
| 622 | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" |
| 623 | fi |
| 624 | fi |
| 625 | fi |
| 626 | fi |
| 627 | fi |
| 628 | dnl Look for dependencies. |
| 629 | if test -n "$found_la"; then |
| 630 | dnl Read the .la file. It defines the variables |
| 631 | dnl dlname, library_names, old_library, dependency_libs, current, |
| 632 | dnl age, revision, installed, dlopen, dlpreopen, libdir. |
| 633 | save_libdir="$libdir" |
| 634 | case "$found_la" in |
| 635 | */* | *\\*) . "$found_la" ;; |
| 636 | *) . "./$found_la" ;; |
| 637 | esac |
| 638 | libdir="$save_libdir" |
| 639 | dnl We use only dependency_libs. |
| 640 | for dep in $dependency_libs; do |
| 641 | case "$dep" in |
| 642 | -L*) |
| 643 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
| 644 | dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. |
| 645 | dnl But don't add it |
| 646 | dnl 1. if it's the standard /usr/lib, |
| 647 | dnl 2. if it's /usr/local/lib and we are using GCC on Linux, |
| 648 | dnl 3. if it's already present in $LDFLAGS or the already |
| 649 | dnl constructed $LIBNAME, |
| 650 | dnl 4. if it doesn't exist as a directory. |
| 651 | if test "X$additional_libdir" != "X/usr/lib"; then |
| 652 | haveit= |
| 653 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
| 654 | if test -n "$GCC"; then |
| 655 | case $host_os in |
| 656 | linux*) haveit=yes;; |
| 657 | esac |
| 658 | fi |
| 659 | fi |
| 660 | if test -z "$haveit"; then |
| 661 | haveit= |
| 662 | for x in $LDFLAGS $LIB[]NAME; do |
| 663 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 664 | if test "X$x" = "X-L$additional_libdir"; then |
| 665 | haveit=yes |
| 666 | break |
| 667 | fi |
| 668 | done |
| 669 | if test -z "$haveit"; then |
| 670 | if test -d "$additional_libdir"; then |
| 671 | dnl Really add $additional_libdir to $LIBNAME. |
| 672 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
| 673 | fi |
| 674 | fi |
| 675 | haveit= |
| 676 | for x in $LDFLAGS $LTLIB[]NAME; do |
| 677 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 678 | if test "X$x" = "X-L$additional_libdir"; then |
| 679 | haveit=yes |
| 680 | break |
| 681 | fi |
| 682 | done |
| 683 | if test -z "$haveit"; then |
| 684 | if test -d "$additional_libdir"; then |
| 685 | dnl Really add $additional_libdir to $LTLIBNAME. |
| 686 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
| 687 | fi |
| 688 | fi |
| 689 | fi |
| 690 | fi |
| 691 | ;; |
| 692 | -R*) |
| 693 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
| 694 | if test "$enable_rpath" != no; then |
| 695 | dnl Potentially add DIR to rpathdirs. |
| 696 | dnl The rpathdirs will be appended to $LIBNAME at the end. |
| 697 | haveit= |
| 698 | for x in $rpathdirs; do |
| 699 | if test "X$x" = "X$dir"; then |
| 700 | haveit=yes |
| 701 | break |
| 702 | fi |
| 703 | done |
| 704 | if test -z "$haveit"; then |
| 705 | rpathdirs="$rpathdirs $dir" |
| 706 | fi |
| 707 | dnl Potentially add DIR to ltrpathdirs. |
| 708 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
| 709 | haveit= |
| 710 | for x in $ltrpathdirs; do |
| 711 | if test "X$x" = "X$dir"; then |
| 712 | haveit=yes |
| 713 | break |
| 714 | fi |
| 715 | done |
| 716 | if test -z "$haveit"; then |
| 717 | ltrpathdirs="$ltrpathdirs $dir" |
| 718 | fi |
| 719 | fi |
| 720 | ;; |
| 721 | -l*) |
| 722 | dnl Handle this in the next round. |
| 723 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
| 724 | ;; |
| 725 | *.la) |
| 726 | dnl Handle this in the next round. Throw away the .la's |
| 727 | dnl directory; it is already contained in a preceding -L |
| 728 | dnl option. |
| 729 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
| 730 | ;; |
| 731 | *) |
| 732 | dnl Most likely an immediate library name. |
| 733 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
| 734 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
| 735 | ;; |
| 736 | esac |
| 737 | done |
| 738 | fi |
| 739 | else |
| 740 | dnl Didn't find the library; assume it is in the system directories |
| 741 | dnl known to the linker and runtime loader. (All the system |
| 742 | dnl directories known to the linker should also be known to the |
| 743 | dnl runtime loader, otherwise the system is severely misconfigured.) |
| 744 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
| 745 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
| 746 | fi |
| 747 | fi |
| 748 | fi |
| 749 | done |
| 750 | done |
| 751 | if test "X$rpathdirs" != "X"; then |
| 752 | if test -n "$hardcode_libdir_separator"; then |
| 753 | dnl Weird platform: only the last -rpath option counts, the user must |
| 754 | dnl pass all path elements in one option. We can arrange that for a |
| 755 | dnl single library, but not when more than one $LIBNAMEs are used. |
| 756 | alldirs= |
| 757 | for found_dir in $rpathdirs; do |
| 758 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
| 759 | done |
| 760 | dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. |
| 761 | acl_save_libdir="$libdir" |
| 762 | libdir="$alldirs" |
| 763 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 764 | libdir="$acl_save_libdir" |
| 765 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
| 766 | else |
| 767 | dnl The -rpath options are cumulative. |
| 768 | for found_dir in $rpathdirs; do |
| 769 | acl_save_libdir="$libdir" |
| 770 | libdir="$found_dir" |
| 771 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 772 | libdir="$acl_save_libdir" |
| 773 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
| 774 | done |
| 775 | fi |
| 776 | fi |
| 777 | if test "X$ltrpathdirs" != "X"; then |
| 778 | dnl When using libtool, the option that works for both libraries and |
| 779 | dnl executables is -R. The -R options are cumulative. |
| 780 | for found_dir in $ltrpathdirs; do |
| 781 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
| 782 | done |
| 783 | fi |
| 784 | ]) |
| 785 | |
| 786 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
| 787 | dnl unless already present in VAR. |
| 788 | dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes |
| 789 | dnl contains two or three consecutive elements that belong together. |
| 790 | AC_DEFUN([AC_LIB_APPENDTOVAR], |
| 791 | [ |
| 792 | for element in [$2]; do |
| 793 | haveit= |
| 794 | for x in $[$1]; do |
| 795 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 796 | if test "X$x" = "X$element"; then |
| 797 | haveit=yes |
| 798 | break |
| 799 | fi |
| 800 | done |
| 801 | if test -z "$haveit"; then |
| 802 | [$1]="${[$1]}${[$1]:+ }$element" |
| 803 | fi |
| 804 | done |
| 805 | ]) |
| 806 | |
| 807 | # lib-prefix.m4 serial 3 (gettext-0.13) |
| 808 | dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. |
| 809 | dnl This file is free software, distributed under the terms of the GNU |
| 810 | dnl General Public License. As a special exception to the GNU General |
| 811 | dnl Public License, this file may be distributed as part of a program |
| 812 | dnl that contains a configuration script generated by Autoconf, under |
| 813 | dnl the same distribution terms as the rest of that program. |
| 814 | |
| 815 | dnl From Bruno Haible. |
| 816 | |
| 817 | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and |
| 818 | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't |
| 819 | dnl require excessive bracketing. |
| 820 | ifdef([AC_HELP_STRING], |
| 821 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], |
| 822 | [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) |
| 823 | |
| 824 | dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed |
| 825 | dnl to access previously installed libraries. The basic assumption is that |
| 826 | dnl a user will want packages to use other packages he previously installed |
| 827 | dnl with the same --prefix option. |
| 828 | dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate |
| 829 | dnl libraries, but is otherwise very convenient. |
| 830 | AC_DEFUN([AC_LIB_PREFIX], |
| 831 | [ |
| 832 | AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) |
| 833 | AC_REQUIRE([AC_PROG_CC]) |
| 834 | AC_REQUIRE([AC_CANONICAL_HOST]) |
| 835 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
| 836 | dnl By default, look in $includedir and $libdir. |
| 837 | use_additional=yes |
| 838 | AC_LIB_WITH_FINAL_PREFIX([ |
| 839 | eval additional_includedir=\"$includedir\" |
| 840 | eval additional_libdir=\"$libdir\" |
| 841 | ]) |
| 842 | AC_LIB_ARG_WITH([lib-prefix], |
| 843 | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib |
| 844 | --without-lib-prefix don't search for libraries in includedir and libdir], |
| 845 | [ |
| 846 | if test "X$withval" = "Xno"; then |
| 847 | use_additional=no |
| 848 | else |
| 849 | if test "X$withval" = "X"; then |
| 850 | AC_LIB_WITH_FINAL_PREFIX([ |
| 851 | eval additional_includedir=\"$includedir\" |
| 852 | eval additional_libdir=\"$libdir\" |
| 853 | ]) |
| 854 | else |
| 855 | additional_includedir="$withval/include" |
| 856 | additional_libdir="$withval/lib" |
| 857 | fi |
| 858 | fi |
| 859 | ]) |
| 860 | if test $use_additional = yes; then |
| 861 | dnl Potentially add $additional_includedir to $CPPFLAGS. |
| 862 | dnl But don't add it |
| 863 | dnl 1. if it's the standard /usr/include, |
| 864 | dnl 2. if it's already present in $CPPFLAGS, |
| 865 | dnl 3. if it's /usr/local/include and we are using GCC on Linux, |
| 866 | dnl 4. if it doesn't exist as a directory. |
| 867 | if test "X$additional_includedir" != "X/usr/include"; then |
| 868 | haveit= |
| 869 | for x in $CPPFLAGS; do |
| 870 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 871 | if test "X$x" = "X-I$additional_includedir"; then |
| 872 | haveit=yes |
| 873 | break |
| 874 | fi |
| 875 | done |
| 876 | if test -z "$haveit"; then |
| 877 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 878 | if test -n "$GCC"; then |
| 879 | case $host_os in |
| 880 | linux*) haveit=yes;; |
| 881 | esac |
| 882 | fi |
| 883 | fi |
| 884 | if test -z "$haveit"; then |
| 885 | if test -d "$additional_includedir"; then |
| 886 | dnl Really add $additional_includedir to $CPPFLAGS. |
| 887 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" |
| 888 | fi |
| 889 | fi |
| 890 | fi |
| 891 | fi |
| 892 | dnl Potentially add $additional_libdir to $LDFLAGS. |
| 893 | dnl But don't add it |
| 894 | dnl 1. if it's the standard /usr/lib, |
| 895 | dnl 2. if it's already present in $LDFLAGS, |
| 896 | dnl 3. if it's /usr/local/lib and we are using GCC on Linux, |
| 897 | dnl 4. if it doesn't exist as a directory. |
| 898 | if test "X$additional_libdir" != "X/usr/lib"; then |
| 899 | haveit= |
| 900 | for x in $LDFLAGS; do |
| 901 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 902 | if test "X$x" = "X-L$additional_libdir"; then |
| 903 | haveit=yes |
| 904 | break |
| 905 | fi |
| 906 | done |
| 907 | if test -z "$haveit"; then |
| 908 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
| 909 | if test -n "$GCC"; then |
| 910 | case $host_os in |
| 911 | linux*) haveit=yes;; |
| 912 | esac |
| 913 | fi |
| 914 | fi |
| 915 | if test -z "$haveit"; then |
| 916 | if test -d "$additional_libdir"; then |
| 917 | dnl Really add $additional_libdir to $LDFLAGS. |
| 918 | LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" |
| 919 | fi |
| 920 | fi |
| 921 | fi |
| 922 | fi |
| 923 | fi |
| 924 | ]) |
| 925 | |
| 926 | dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, |
| 927 | dnl acl_final_exec_prefix, containing the values to which $prefix and |
| 928 | dnl $exec_prefix will expand at the end of the configure script. |
| 929 | AC_DEFUN([AC_LIB_PREPARE_PREFIX], |
| 930 | [ |
| 931 | dnl Unfortunately, prefix and exec_prefix get only finally determined |
| 932 | dnl at the end of configure. |
| 933 | if test "X$prefix" = "XNONE"; then |
| 934 | acl_final_prefix="$ac_default_prefix" |
| 935 | else |
| 936 | acl_final_prefix="$prefix" |
| 937 | fi |
| 938 | if test "X$exec_prefix" = "XNONE"; then |
| 939 | acl_final_exec_prefix='${prefix}' |
| 940 | else |
| 941 | acl_final_exec_prefix="$exec_prefix" |
| 942 | fi |
| 943 | acl_save_prefix="$prefix" |
| 944 | prefix="$acl_final_prefix" |
| 945 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" |
| 946 | prefix="$acl_save_prefix" |
| 947 | ]) |
| 948 | |
| 949 | dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the |
| 950 | dnl variables prefix and exec_prefix bound to the values they will have |
| 951 | dnl at the end of the configure script. |
| 952 | AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], |
| 953 | [ |
| 954 | acl_save_prefix="$prefix" |
| 955 | prefix="$acl_final_prefix" |
| 956 | acl_save_exec_prefix="$exec_prefix" |
| 957 | exec_prefix="$acl_final_exec_prefix" |
| 958 | $1 |
| 959 | exec_prefix="$acl_save_exec_prefix" |
| 960 | prefix="$acl_save_prefix" |
| 961 | ]) |
| 962 | |
| 963 | # -*- Autoconf -*- |
| 964 | # Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
| 965 | # Generated from amversion.in; do not edit by hand. |
| 966 | |
| 967 | # This program is free software; you can redistribute it and/or modify |
| 968 | # it under the terms of the GNU General Public License as published by |
| 969 | # the Free Software Foundation; either version 2, or (at your option) |
| 970 | # any later version. |
| 971 | |
| 972 | # This program is distributed in the hope that it will be useful, |
| 973 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 974 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 975 | # GNU General Public License for more details. |
| 976 | |
| 977 | # You should have received a copy of the GNU General Public License |
| 978 | # along with this program; if not, write to the Free Software |
| 979 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 980 | |
| 981 | # AM_AUTOMAKE_VERSION(VERSION) |
| 982 | # ---------------------------- |
| 983 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
| 984 | # generated from the m4 files accompanying Automake X.Y. |
| 985 | AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) |
| 986 | |
| 987 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
| 988 | # ------------------------------- |
| 989 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
| 990 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
| 991 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
| 992 | [AM_AUTOMAKE_VERSION([1.8.4])]) |
| 993 | |
| 994 | # AM_AUX_DIR_EXPAND |
| 995 | |
| 996 | # Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
| 997 | |
| 998 | # This program is free software; you can redistribute it and/or modify |
| 999 | # it under the terms of the GNU General Public License as published by |
| 1000 | # the Free Software Foundation; either version 2, or (at your option) |
| 1001 | # any later version. |
| 1002 | |
| 1003 | # This program is distributed in the hope that it will be useful, |
| 1004 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1005 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1006 | # GNU General Public License for more details. |
| 1007 | |
| 1008 | # You should have received a copy of the GNU General Public License |
| 1009 | # along with this program; if not, write to the Free Software |
| 1010 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1011 | # 02111-1307, USA. |
| 1012 | |
| 1013 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
| 1014 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
| 1015 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
| 1016 | # |
| 1017 | # Of course, Automake must honor this variable whenever it calls a |
| 1018 | # tool from the auxiliary directory. The problem is that $srcdir (and |
| 1019 | # therefore $ac_aux_dir as well) can be either absolute or relative, |
| 1020 | # depending on how configure is run. This is pretty annoying, since |
| 1021 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top |
| 1022 | # source directory, any form will work fine, but in subdirectories a |
| 1023 | # relative path needs to be adjusted first. |
| 1024 | # |
| 1025 | # $ac_aux_dir/missing |
| 1026 | # fails when called from a subdirectory if $ac_aux_dir is relative |
| 1027 | # $top_srcdir/$ac_aux_dir/missing |
| 1028 | # fails if $ac_aux_dir is absolute, |
| 1029 | # fails when called from a subdirectory in a VPATH build with |
| 1030 | # a relative $ac_aux_dir |
| 1031 | # |
| 1032 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
| 1033 | # are both prefixed by $srcdir. In an in-source build this is usually |
| 1034 | # harmless because $srcdir is `.', but things will broke when you |
| 1035 | # start a VPATH build or use an absolute $srcdir. |
| 1036 | # |
| 1037 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
| 1038 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
| 1039 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
| 1040 | # and then we would define $MISSING as |
| 1041 | # MISSING="\${SHELL} $am_aux_dir/missing" |
| 1042 | # This will work as long as MISSING is not called from configure, because |
| 1043 | # unfortunately $(top_srcdir) has no meaning in configure. |
| 1044 | # However there are other variables, like CC, which are often used in |
| 1045 | # configure, and could therefore not use this "fixed" $ac_aux_dir. |
| 1046 | # |
| 1047 | # Another solution, used here, is to always expand $ac_aux_dir to an |
| 1048 | # absolute PATH. The drawback is that using absolute paths prevent a |
| 1049 | # configured tree to be moved without reconfiguration. |
| 1050 | |
| 1051 | AC_DEFUN([AM_AUX_DIR_EXPAND], |
| 1052 | [dnl Rely on autoconf to set up CDPATH properly. |
| 1053 | AC_PREREQ([2.50])dnl |
| 1054 | # expand $ac_aux_dir to an absolute path |
| 1055 | am_aux_dir=`cd $ac_aux_dir && pwd` |
| 1056 | ]) |
| 1057 | |
| 1058 | # AM_CONDITIONAL -*- Autoconf -*- |
| 1059 | |
| 1060 | # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. |
| 1061 | |
| 1062 | # This program is free software; you can redistribute it and/or modify |
| 1063 | # it under the terms of the GNU General Public License as published by |
| 1064 | # the Free Software Foundation; either version 2, or (at your option) |
| 1065 | # any later version. |
| 1066 | |
| 1067 | # This program is distributed in the hope that it will be useful, |
| 1068 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1069 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1070 | # GNU General Public License for more details. |
| 1071 | |
| 1072 | # You should have received a copy of the GNU General Public License |
| 1073 | # along with this program; if not, write to the Free Software |
| 1074 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1075 | # 02111-1307, USA. |
| 1076 | |
| 1077 | # serial 6 |
| 1078 | |
| 1079 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
| 1080 | # ------------------------------------- |
| 1081 | # Define a conditional. |
| 1082 | AC_DEFUN([AM_CONDITIONAL], |
| 1083 | [AC_PREREQ(2.52)dnl |
| 1084 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
| 1085 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
| 1086 | AC_SUBST([$1_TRUE]) |
| 1087 | AC_SUBST([$1_FALSE]) |
| 1088 | if $2; then |
| 1089 | $1_TRUE= |
| 1090 | $1_FALSE='#' |
| 1091 | else |
| 1092 | $1_TRUE='#' |
| 1093 | $1_FALSE= |
| 1094 | fi |
| 1095 | AC_CONFIG_COMMANDS_PRE( |
| 1096 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
| 1097 | AC_MSG_ERROR([conditional "$1" was never defined. |
| 1098 | Usually this means the macro was only invoked conditionally.]) |
| 1099 | fi])]) |
| 1100 | |
| 1101 | # serial 7 -*- Autoconf -*- |
| 1102 | |
| 1103 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 |
| 1104 | # Free Software Foundation, Inc. |
| 1105 | |
| 1106 | # This program is free software; you can redistribute it and/or modify |
| 1107 | # it under the terms of the GNU General Public License as published by |
| 1108 | # the Free Software Foundation; either version 2, or (at your option) |
| 1109 | # any later version. |
| 1110 | |
| 1111 | # This program is distributed in the hope that it will be useful, |
| 1112 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1113 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1114 | # GNU General Public License for more details. |
| 1115 | |
| 1116 | # You should have received a copy of the GNU General Public License |
| 1117 | # along with this program; if not, write to the Free Software |
| 1118 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1119 | # 02111-1307, USA. |
| 1120 | |
| 1121 | |
| 1122 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
| 1123 | # written in clear, in which case automake, when reading aclocal.m4, |
| 1124 | # will think it sees a *use*, and therefore will trigger all it's |
| 1125 | # C support machinery. Also note that it means that autoscan, seeing |
| 1126 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
| 1127 | |
| 1128 | |
| 1129 | |
| 1130 | # _AM_DEPENDENCIES(NAME) |
| 1131 | # ---------------------- |
| 1132 | # See how the compiler implements dependency checking. |
| 1133 | # NAME is "CC", "CXX", "GCJ", or "OBJC". |
| 1134 | # We try a few techniques and use that to set a single cache variable. |
| 1135 | # |
| 1136 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
| 1137 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
| 1138 | # dependency, and given that the user is not expected to run this macro, |
| 1139 | # just rely on AC_PROG_CC. |
| 1140 | AC_DEFUN([_AM_DEPENDENCIES], |
| 1141 | [AC_REQUIRE([AM_SET_DEPDIR])dnl |
| 1142 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
| 1143 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
| 1144 | AC_REQUIRE([AM_DEP_TRACK])dnl |
| 1145 | |
| 1146 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
| 1147 | [$1], CXX, [depcc="$CXX" am_compiler_list=], |
| 1148 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
| 1149 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
| 1150 | [depcc="$$1" am_compiler_list=]) |
| 1151 | |
| 1152 | AC_CACHE_CHECK([dependency style of $depcc], |
| 1153 | [am_cv_$1_dependencies_compiler_type], |
| 1154 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
| 1155 | # We make a subdir and do the tests there. Otherwise we can end up |
| 1156 | # making bogus files that we don't know about and never remove. For |
| 1157 | # instance it was reported that on HP-UX the gcc test will end up |
| 1158 | # making a dummy file named `D' -- because `-MD' means `put the output |
| 1159 | # in D'. |
| 1160 | mkdir conftest.dir |
| 1161 | # Copy depcomp to subdir because otherwise we won't find it if we're |
| 1162 | # using a relative directory. |
| 1163 | cp "$am_depcomp" conftest.dir |
| 1164 | cd conftest.dir |
| 1165 | # We will build objects and dependencies in a subdirectory because |
| 1166 | # it helps to detect inapplicable dependency modes. For instance |
| 1167 | # both Tru64's cc and ICC support -MD to output dependencies as a |
| 1168 | # side effect of compilation, but ICC will put the dependencies in |
| 1169 | # the current directory while Tru64 will put them in the object |
| 1170 | # directory. |
| 1171 | mkdir sub |
| 1172 | |
| 1173 | am_cv_$1_dependencies_compiler_type=none |
| 1174 | if test "$am_compiler_list" = ""; then |
| 1175 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
| 1176 | fi |
| 1177 | for depmode in $am_compiler_list; do |
| 1178 | # Setup a source with many dependencies, because some compilers |
| 1179 | # like to wrap large dependency lists on column 80 (with \), and |
| 1180 | # we should not choose a depcomp mode which is confused by this. |
| 1181 | # |
| 1182 | # We need to recreate these files for each test, as the compiler may |
| 1183 | # overwrite some of them when testing with obscure command lines. |
| 1184 | # This happens at least with the AIX C compiler. |
| 1185 | : > sub/conftest.c |
| 1186 | for i in 1 2 3 4 5 6; do |
| 1187 | echo '#include "conftst'$i'.h"' >> sub/conftest.c |
| 1188 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with |
| 1189 | # Solaris 8's {/usr,}/bin/sh. |
| 1190 | touch sub/conftst$i.h |
| 1191 | done |
| 1192 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
| 1193 | |
| 1194 | case $depmode in |
| 1195 | nosideeffect) |
| 1196 | # after this tag, mechanisms are not by side-effect, so they'll |
| 1197 | # only be used when explicitly requested |
| 1198 | if test "x$enable_dependency_tracking" = xyes; then |
| 1199 | continue |
| 1200 | else |
| 1201 | break |
| 1202 | fi |
| 1203 | ;; |
| 1204 | none) break ;; |
| 1205 | esac |
| 1206 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
| 1207 | # mode. It turns out that the SunPro C++ compiler does not properly |
| 1208 | # handle `-M -o', and we need to detect this. |
| 1209 | if depmode=$depmode \ |
| 1210 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ |
| 1211 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
| 1212 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ |
| 1213 | >/dev/null 2>conftest.err && |
| 1214 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
| 1215 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && |
| 1216 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
| 1217 | # icc doesn't choke on unknown options, it will just issue warnings |
| 1218 | # or remarks (even with -Werror). So we grep stderr for any message |
| 1219 | # that says an option was ignored or not supported. |
| 1220 | # When given -MP, icc 7.0 and 7.1 complain thusly: |
| 1221 | # icc: Command line warning: ignoring option '-M'; no argument required |
| 1222 | # The diagnosis changed in icc 8.0: |
| 1223 | # icc: Command line remark: option '-MP' not supported |
| 1224 | if (grep 'ignoring option' conftest.err || |
| 1225 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
| 1226 | am_cv_$1_dependencies_compiler_type=$depmode |
| 1227 | break |
| 1228 | fi |
| 1229 | fi |
| 1230 | done |
| 1231 | |
| 1232 | cd .. |
| 1233 | rm -rf conftest.dir |
| 1234 | else |
| 1235 | am_cv_$1_dependencies_compiler_type=none |
| 1236 | fi |
| 1237 | ]) |
| 1238 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
| 1239 | AM_CONDITIONAL([am__fastdep$1], [ |
| 1240 | test "x$enable_dependency_tracking" != xno \ |
| 1241 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
| 1242 | ]) |
| 1243 | |
| 1244 | |
| 1245 | # AM_SET_DEPDIR |
| 1246 | # ------------- |
| 1247 | # Choose a directory name for dependency files. |
| 1248 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES |
| 1249 | AC_DEFUN([AM_SET_DEPDIR], |
| 1250 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
| 1251 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
| 1252 | ]) |
| 1253 | |
| 1254 | |
| 1255 | # AM_DEP_TRACK |
| 1256 | # ------------ |
| 1257 | AC_DEFUN([AM_DEP_TRACK], |
| 1258 | [AC_ARG_ENABLE(dependency-tracking, |
| 1259 | [ --disable-dependency-tracking speeds up one-time build |
| 1260 | --enable-dependency-tracking do not reject slow dependency extractors]) |
| 1261 | if test "x$enable_dependency_tracking" != xno; then |
| 1262 | am_depcomp="$ac_aux_dir/depcomp" |
| 1263 | AMDEPBACKSLASH='\' |
| 1264 | fi |
| 1265 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
| 1266 | AC_SUBST([AMDEPBACKSLASH]) |
| 1267 | ]) |
| 1268 | |
| 1269 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
| 1270 | |
| 1271 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
| 1272 | |
| 1273 | # This program is free software; you can redistribute it and/or modify |
| 1274 | # it under the terms of the GNU General Public License as published by |
| 1275 | # the Free Software Foundation; either version 2, or (at your option) |
| 1276 | # any later version. |
| 1277 | |
| 1278 | # This program is distributed in the hope that it will be useful, |
| 1279 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1280 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1281 | # GNU General Public License for more details. |
| 1282 | |
| 1283 | # You should have received a copy of the GNU General Public License |
| 1284 | # along with this program; if not, write to the Free Software |
| 1285 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1286 | # 02111-1307, USA. |
| 1287 | |
| 1288 | #serial 2 |
| 1289 | |
| 1290 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 1291 | # ------------------------------ |
| 1292 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 1293 | [for mf in $CONFIG_FILES; do |
| 1294 | # Strip MF so we end up with the name of the file. |
| 1295 | mf=`echo "$mf" | sed -e 's/:.*$//'` |
| 1296 | # Check whether this is an Automake generated Makefile or not. |
| 1297 | # We used to match only the files named `Makefile.in', but |
| 1298 | # some people rename them; so instead we look at the file content. |
| 1299 | # Grep'ing the first line is not enough: some people post-process |
| 1300 | # each Makefile.in and add a new line on top of each file to say so. |
| 1301 | # So let's grep whole file. |
| 1302 | if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then |
| 1303 | dirpart=`AS_DIRNAME("$mf")` |
| 1304 | else |
| 1305 | continue |
| 1306 | fi |
| 1307 | grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue |
| 1308 | # Extract the definition of DEP_FILES from the Makefile without |
| 1309 | # running `make'. |
| 1310 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
| 1311 | test -z "$DEPDIR" && continue |
| 1312 | # When using ansi2knr, U may be empty or an underscore; expand it |
| 1313 | U=`sed -n 's/^U = //p' < "$mf"` |
| 1314 | test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" |
| 1315 | # We invoke sed twice because it is the simplest approach to |
| 1316 | # changing $(DEPDIR) to its actual value in the expansion. |
| 1317 | for file in `sed -n ' |
| 1318 | /^DEP_FILES = .*\\\\$/ { |
| 1319 | s/^DEP_FILES = // |
| 1320 | :loop |
| 1321 | s/\\\\$// |
| 1322 | p |
| 1323 | n |
| 1324 | /\\\\$/ b loop |
| 1325 | p |
| 1326 | } |
| 1327 | /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ |
| 1328 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
| 1329 | # Make sure the directory exists. |
| 1330 | test -f "$dirpart/$file" && continue |
| 1331 | fdir=`AS_DIRNAME(["$file"])` |
| 1332 | AS_MKDIR_P([$dirpart/$fdir]) |
| 1333 | # echo "creating $dirpart/$file" |
| 1334 | echo '# dummy' > "$dirpart/$file" |
| 1335 | done |
| 1336 | done |
| 1337 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 1338 | |
| 1339 | |
| 1340 | # AM_OUTPUT_DEPENDENCY_COMMANDS |
| 1341 | # ----------------------------- |
| 1342 | # This macro should only be invoked once -- use via AC_REQUIRE. |
| 1343 | # |
| 1344 | # This code is only required when automatic dependency tracking |
| 1345 | # is enabled. FIXME. This creates each `.P' file that we will |
| 1346 | # need in order to bootstrap the dependency handling code. |
| 1347 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 1348 | [AC_CONFIG_COMMANDS([depfiles], |
| 1349 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 1350 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
| 1351 | ]) |
| 1352 | |
| 1353 | # Do all the work for Automake. -*- Autoconf -*- |
| 1354 | |
| 1355 | # This macro actually does too much some checks are only needed if |
| 1356 | # your package does certain things. But this isn't really a big deal. |
| 1357 | |
| 1358 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 |
| 1359 | # Free Software Foundation, Inc. |
| 1360 | |
| 1361 | # This program is free software; you can redistribute it and/or modify |
| 1362 | # it under the terms of the GNU General Public License as published by |
| 1363 | # the Free Software Foundation; either version 2, or (at your option) |
| 1364 | # any later version. |
| 1365 | |
| 1366 | # This program is distributed in the hope that it will be useful, |
| 1367 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1368 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1369 | # GNU General Public License for more details. |
| 1370 | |
| 1371 | # You should have received a copy of the GNU General Public License |
| 1372 | # along with this program; if not, write to the Free Software |
| 1373 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1374 | # 02111-1307, USA. |
| 1375 | |
| 1376 | # serial 11 |
| 1377 | |
| 1378 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
| 1379 | # AM_INIT_AUTOMAKE([OPTIONS]) |
| 1380 | # ----------------------------------------------- |
| 1381 | # The call with PACKAGE and VERSION arguments is the old style |
| 1382 | # call (pre autoconf-2.50), which is being phased out. PACKAGE |
| 1383 | # and VERSION should now be passed to AC_INIT and removed from |
| 1384 | # the call to AM_INIT_AUTOMAKE. |
| 1385 | # We support both call styles for the transition. After |
| 1386 | # the next Automake release, Autoconf can make the AC_INIT |
| 1387 | # arguments mandatory, and then we can depend on a new Autoconf |
| 1388 | # release and drop the old call support. |
| 1389 | AC_DEFUN([AM_INIT_AUTOMAKE], |
| 1390 | [AC_PREREQ([2.58])dnl |
| 1391 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
| 1392 | dnl the ones we care about. |
| 1393 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
| 1394 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
| 1395 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
| 1396 | # test to see if srcdir already configured |
| 1397 | if test "`cd $srcdir && pwd`" != "`pwd`" && |
| 1398 | test -f $srcdir/config.status; then |
| 1399 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
| 1400 | fi |
| 1401 | |
| 1402 | # test whether we have cygpath |
| 1403 | if test -z "$CYGPATH_W"; then |
| 1404 | if (cygpath --version) >/dev/null 2>/dev/null; then |
| 1405 | CYGPATH_W='cygpath -w' |
| 1406 | else |
| 1407 | CYGPATH_W=echo |
| 1408 | fi |
| 1409 | fi |
| 1410 | AC_SUBST([CYGPATH_W]) |
| 1411 | |
| 1412 | # Define the identity of the package. |
| 1413 | dnl Distinguish between old-style and new-style calls. |
| 1414 | m4_ifval([$2], |
| 1415 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
| 1416 | AC_SUBST([PACKAGE], [$1])dnl |
| 1417 | AC_SUBST([VERSION], [$2])], |
| 1418 | [_AM_SET_OPTIONS([$1])dnl |
| 1419 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
| 1420 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
| 1421 | |
| 1422 | _AM_IF_OPTION([no-define],, |
| 1423 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
| 1424 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
| 1425 | |
| 1426 | # Some tools Automake needs. |
| 1427 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
| 1428 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
| 1429 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
| 1430 | AM_MISSING_PROG(AUTOCONF, autoconf) |
| 1431 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
| 1432 | AM_MISSING_PROG(AUTOHEADER, autoheader) |
| 1433 | AM_MISSING_PROG(MAKEINFO, makeinfo) |
| 1434 | AM_MISSING_PROG(AMTAR, tar) |
| 1435 | AM_PROG_INSTALL_SH |
| 1436 | AM_PROG_INSTALL_STRIP |
| 1437 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl |
| 1438 | # We need awk for the "check" target. The system "awk" is bad on |
| 1439 | # some platforms. |
| 1440 | AC_REQUIRE([AC_PROG_AWK])dnl |
| 1441 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
| 1442 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
| 1443 | |
| 1444 | _AM_IF_OPTION([no-dependencies],, |
| 1445 | [AC_PROVIDE_IFELSE([AC_PROG_CC], |
| 1446 | [_AM_DEPENDENCIES(CC)], |
| 1447 | [define([AC_PROG_CC], |
| 1448 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl |
| 1449 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
| 1450 | [_AM_DEPENDENCIES(CXX)], |
| 1451 | [define([AC_PROG_CXX], |
| 1452 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
| 1453 | ]) |
| 1454 | ]) |
| 1455 | |
| 1456 | |
| 1457 | # When config.status generates a header, we must update the stamp-h file. |
| 1458 | # This file resides in the same directory as the config header |
| 1459 | # that is generated. The stamp files are numbered to have different names. |
| 1460 | |
| 1461 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
| 1462 | # loop where config.status creates the headers, so we can generate |
| 1463 | # our stamp files there. |
| 1464 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
| 1465 | [# Compute $1's index in $config_headers. |
| 1466 | _am_stamp_count=1 |
| 1467 | for _am_header in $config_headers :; do |
| 1468 | case $_am_header in |
| 1469 | $1 | $1:* ) |
| 1470 | break ;; |
| 1471 | * ) |
| 1472 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; |
| 1473 | esac |
| 1474 | done |
| 1475 | echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) |
| 1476 | |
| 1477 | # AM_PROG_INSTALL_SH |
| 1478 | # ------------------ |
| 1479 | # Define $install_sh. |
| 1480 | |
| 1481 | # Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
| 1482 | |
| 1483 | # This program is free software; you can redistribute it and/or modify |
| 1484 | # it under the terms of the GNU General Public License as published by |
| 1485 | # the Free Software Foundation; either version 2, or (at your option) |
| 1486 | # any later version. |
| 1487 | |
| 1488 | # This program is distributed in the hope that it will be useful, |
| 1489 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1490 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1491 | # GNU General Public License for more details. |
| 1492 | |
| 1493 | # You should have received a copy of the GNU General Public License |
| 1494 | # along with this program; if not, write to the Free Software |
| 1495 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1496 | # 02111-1307, USA. |
| 1497 | |
| 1498 | AC_DEFUN([AM_PROG_INSTALL_SH], |
| 1499 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 1500 | install_sh=${install_sh-"$am_aux_dir/install-sh"} |
| 1501 | AC_SUBST(install_sh)]) |
| 1502 | |
| 1503 | # -*- Autoconf -*- |
| 1504 | # Copyright (C) 2003 Free Software Foundation, Inc. |
| 1505 | |
| 1506 | # This program is free software; you can redistribute it and/or modify |
| 1507 | # it under the terms of the GNU General Public License as published by |
| 1508 | # the Free Software Foundation; either version 2, or (at your option) |
| 1509 | # any later version. |
| 1510 | |
| 1511 | # This program is distributed in the hope that it will be useful, |
| 1512 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1513 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1514 | # GNU General Public License for more details. |
| 1515 | |
| 1516 | # You should have received a copy of the GNU General Public License |
| 1517 | # along with this program; if not, write to the Free Software |
| 1518 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1519 | # 02111-1307, USA. |
| 1520 | |
| 1521 | # serial 1 |
| 1522 | |
| 1523 | # Check whether the underlying file-system supports filenames |
| 1524 | # with a leading dot. For instance MS-DOS doesn't. |
| 1525 | AC_DEFUN([AM_SET_LEADING_DOT], |
| 1526 | [rm -rf .tst 2>/dev/null |
| 1527 | mkdir .tst 2>/dev/null |
| 1528 | if test -d .tst; then |
| 1529 | am__leading_dot=. |
| 1530 | else |
| 1531 | am__leading_dot=_ |
| 1532 | fi |
| 1533 | rmdir .tst 2>/dev/null |
| 1534 | AC_SUBST([am__leading_dot])]) |
| 1535 | |
| 1536 | # Add --enable-maintainer-mode option to configure. |
| 1537 | # From Jim Meyering |
| 1538 | |
| 1539 | # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 |
| 1540 | # Free Software Foundation, Inc. |
| 1541 | |
| 1542 | # This program is free software; you can redistribute it and/or modify |
| 1543 | # it under the terms of the GNU General Public License as published by |
| 1544 | # the Free Software Foundation; either version 2, or (at your option) |
| 1545 | # any later version. |
| 1546 | |
| 1547 | # This program is distributed in the hope that it will be useful, |
| 1548 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1549 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1550 | # GNU General Public License for more details. |
| 1551 | |
| 1552 | # You should have received a copy of the GNU General Public License |
| 1553 | # along with this program; if not, write to the Free Software |
| 1554 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1555 | # 02111-1307, USA. |
| 1556 | |
| 1557 | # serial 3 |
| 1558 | |
| 1559 | AC_DEFUN([AM_MAINTAINER_MODE], |
| 1560 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
| 1561 | dnl maintainer-mode is disabled by default |
| 1562 | AC_ARG_ENABLE(maintainer-mode, |
| 1563 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
| 1564 | (and sometimes confusing) to the casual installer], |
| 1565 | USE_MAINTAINER_MODE=$enableval, |
| 1566 | USE_MAINTAINER_MODE=no) |
| 1567 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) |
| 1568 | AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) |
| 1569 | MAINT=$MAINTAINER_MODE_TRUE |
| 1570 | AC_SUBST(MAINT)dnl |
| 1571 | ] |
| 1572 | ) |
| 1573 | |
| 1574 | AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) |
| 1575 | |
| 1576 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
| 1577 | |
| 1578 | # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
| 1579 | |
| 1580 | # This program is free software; you can redistribute it and/or modify |
| 1581 | # it under the terms of the GNU General Public License as published by |
| 1582 | # the Free Software Foundation; either version 2, or (at your option) |
| 1583 | # any later version. |
| 1584 | |
| 1585 | # This program is distributed in the hope that it will be useful, |
| 1586 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1587 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1588 | # GNU General Public License for more details. |
| 1589 | |
| 1590 | # You should have received a copy of the GNU General Public License |
| 1591 | # along with this program; if not, write to the Free Software |
| 1592 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1593 | # 02111-1307, USA. |
| 1594 | |
| 1595 | # serial 2 |
| 1596 | |
| 1597 | # AM_MAKE_INCLUDE() |
| 1598 | # ----------------- |
| 1599 | # Check to see how make treats includes. |
| 1600 | AC_DEFUN([AM_MAKE_INCLUDE], |
| 1601 | [am_make=${MAKE-make} |
| 1602 | cat > confinc << 'END' |
| 1603 | am__doit: |
| 1604 | @echo done |
| 1605 | .PHONY: am__doit |
| 1606 | END |
| 1607 | # If we don't find an include directive, just comment out the code. |
| 1608 | AC_MSG_CHECKING([for style of include used by $am_make]) |
| 1609 | am__include="#" |
| 1610 | am__quote= |
| 1611 | _am_result=none |
| 1612 | # First try GNU make style include. |
| 1613 | echo "include confinc" > confmf |
| 1614 | # We grep out `Entering directory' and `Leaving directory' |
| 1615 | # messages which can occur if `w' ends up in MAKEFLAGS. |
| 1616 | # In particular we don't look at `^make:' because GNU make might |
| 1617 | # be invoked under some other name (usually "gmake"), in which |
| 1618 | # case it prints its new name instead of `make'. |
| 1619 | if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then |
| 1620 | am__include=include |
| 1621 | am__quote= |
| 1622 | _am_result=GNU |
| 1623 | fi |
| 1624 | # Now try BSD make style include. |
| 1625 | if test "$am__include" = "#"; then |
| 1626 | echo '.include "confinc"' > confmf |
| 1627 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then |
| 1628 | am__include=.include |
| 1629 | am__quote="\"" |
| 1630 | _am_result=BSD |
| 1631 | fi |
| 1632 | fi |
| 1633 | AC_SUBST([am__include]) |
| 1634 | AC_SUBST([am__quote]) |
| 1635 | AC_MSG_RESULT([$_am_result]) |
| 1636 | rm -f confinc confmf |
| 1637 | ]) |
| 1638 | |
| 1639 | # -*- Autoconf -*- |
| 1640 | |
| 1641 | |
| 1642 | # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. |
| 1643 | |
| 1644 | # This program is free software; you can redistribute it and/or modify |
| 1645 | # it under the terms of the GNU General Public License as published by |
| 1646 | # the Free Software Foundation; either version 2, or (at your option) |
| 1647 | # any later version. |
| 1648 | |
| 1649 | # This program is distributed in the hope that it will be useful, |
| 1650 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1651 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1652 | # GNU General Public License for more details. |
| 1653 | |
| 1654 | # You should have received a copy of the GNU General Public License |
| 1655 | # along with this program; if not, write to the Free Software |
| 1656 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1657 | # 02111-1307, USA. |
| 1658 | |
| 1659 | # serial 3 |
| 1660 | |
| 1661 | # AM_MISSING_PROG(NAME, PROGRAM) |
| 1662 | # ------------------------------ |
| 1663 | AC_DEFUN([AM_MISSING_PROG], |
| 1664 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) |
| 1665 | $1=${$1-"${am_missing_run}$2"} |
| 1666 | AC_SUBST($1)]) |
| 1667 | |
| 1668 | |
| 1669 | # AM_MISSING_HAS_RUN |
| 1670 | # ------------------ |
| 1671 | # Define MISSING if not defined so far and test if it supports --run. |
| 1672 | # If it does, set am_missing_run to use it, otherwise, to nothing. |
| 1673 | AC_DEFUN([AM_MISSING_HAS_RUN], |
| 1674 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 1675 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" |
| 1676 | # Use eval to expand $SHELL |
| 1677 | if eval "$MISSING --run true"; then |
| 1678 | am_missing_run="$MISSING --run " |
| 1679 | else |
| 1680 | am_missing_run= |
| 1681 | AC_MSG_WARN([`missing' script is too old or missing]) |
| 1682 | fi |
| 1683 | ]) |
| 1684 | |
| 1685 | # AM_PROG_MKDIR_P |
| 1686 | # --------------- |
| 1687 | # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. |
| 1688 | |
| 1689 | # Copyright (C) 2003, 2004 Free Software Foundation, Inc. |
| 1690 | |
| 1691 | # This program is free software; you can redistribute it and/or modify |
| 1692 | # it under the terms of the GNU General Public License as published by |
| 1693 | # the Free Software Foundation; either version 2, or (at your option) |
| 1694 | # any later version. |
| 1695 | |
| 1696 | # This program is distributed in the hope that it will be useful, |
| 1697 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1698 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1699 | # GNU General Public License for more details. |
| 1700 | |
| 1701 | # You should have received a copy of the GNU General Public License |
| 1702 | # along with this program; if not, write to the Free Software |
| 1703 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1704 | # 02111-1307, USA. |
| 1705 | |
| 1706 | # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories |
| 1707 | # created by `make install' are always world readable, even if the |
| 1708 | # installer happens to have an overly restrictive umask (e.g. 077). |
| 1709 | # This was a mistake. There are at least two reasons why we must not |
| 1710 | # use `-m 0755': |
| 1711 | # - it causes special bits like SGID to be ignored, |
| 1712 | # - it may be too restrictive (some setups expect 775 directories). |
| 1713 | # |
| 1714 | # Do not use -m 0755 and let people choose whatever they expect by |
| 1715 | # setting umask. |
| 1716 | # |
| 1717 | # We cannot accept any implementation of `mkdir' that recognizes `-p'. |
| 1718 | # Some implementations (such as Solaris 8's) are not thread-safe: if a |
| 1719 | # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' |
| 1720 | # concurrently, both version can detect that a/ is missing, but only |
| 1721 | # one can create it and the other will error out. Consequently we |
| 1722 | # restrict ourselves to GNU make (using the --version option ensures |
| 1723 | # this.) |
| 1724 | AC_DEFUN([AM_PROG_MKDIR_P], |
| 1725 | [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then |
| 1726 | # Keeping the `.' argument allows $(mkdir_p) to be used without |
| 1727 | # argument. Indeed, we sometimes output rules like |
| 1728 | # $(mkdir_p) $(somedir) |
| 1729 | # where $(somedir) is conditionally defined. |
| 1730 | # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more |
| 1731 | # expensive solution, as it forces Make to start a sub-shell.) |
| 1732 | mkdir_p='mkdir -p -- .' |
| 1733 | else |
| 1734 | # On NextStep and OpenStep, the `mkdir' command does not |
| 1735 | # recognize any option. It will interpret all options as |
| 1736 | # directories to create, and then abort because `.' already |
| 1737 | # exists. |
| 1738 | for d in ./-p ./--version; |
| 1739 | do |
| 1740 | test -d $d && rmdir $d |
| 1741 | done |
| 1742 | # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. |
| 1743 | if test -f "$ac_aux_dir/mkinstalldirs"; then |
| 1744 | mkdir_p='$(mkinstalldirs)' |
| 1745 | else |
| 1746 | mkdir_p='$(install_sh) -d' |
| 1747 | fi |
| 1748 | fi |
| 1749 | AC_SUBST([mkdir_p])]) |
| 1750 | |
| 1751 | # Helper functions for option handling. -*- Autoconf -*- |
| 1752 | |
| 1753 | # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
| 1754 | |
| 1755 | # This program is free software; you can redistribute it and/or modify |
| 1756 | # it under the terms of the GNU General Public License as published by |
| 1757 | # the Free Software Foundation; either version 2, or (at your option) |
| 1758 | # any later version. |
| 1759 | |
| 1760 | # This program is distributed in the hope that it will be useful, |
| 1761 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1762 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1763 | # GNU General Public License for more details. |
| 1764 | |
| 1765 | # You should have received a copy of the GNU General Public License |
| 1766 | # along with this program; if not, write to the Free Software |
| 1767 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1768 | # 02111-1307, USA. |
| 1769 | |
| 1770 | # serial 2 |
| 1771 | |
| 1772 | # _AM_MANGLE_OPTION(NAME) |
| 1773 | # ----------------------- |
| 1774 | AC_DEFUN([_AM_MANGLE_OPTION], |
| 1775 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
| 1776 | |
| 1777 | # _AM_SET_OPTION(NAME) |
| 1778 | # ------------------------------ |
| 1779 | # Set option NAME. Presently that only means defining a flag for this option. |
| 1780 | AC_DEFUN([_AM_SET_OPTION], |
| 1781 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
| 1782 | |
| 1783 | # _AM_SET_OPTIONS(OPTIONS) |
| 1784 | # ---------------------------------- |
| 1785 | # OPTIONS is a space-separated list of Automake options. |
| 1786 | AC_DEFUN([_AM_SET_OPTIONS], |
| 1787 | [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
| 1788 | |
| 1789 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
| 1790 | # ------------------------------------------- |
| 1791 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
| 1792 | AC_DEFUN([_AM_IF_OPTION], |
| 1793 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
| 1794 | |
| 1795 | # |
| 1796 | # Check to make sure that the build environment is sane. |
| 1797 | # |
| 1798 | |
| 1799 | # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. |
| 1800 | |
| 1801 | # This program is free software; you can redistribute it and/or modify |
| 1802 | # it under the terms of the GNU General Public License as published by |
| 1803 | # the Free Software Foundation; either version 2, or (at your option) |
| 1804 | # any later version. |
| 1805 | |
| 1806 | # This program is distributed in the hope that it will be useful, |
| 1807 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1808 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1809 | # GNU General Public License for more details. |
| 1810 | |
| 1811 | # You should have received a copy of the GNU General Public License |
| 1812 | # along with this program; if not, write to the Free Software |
| 1813 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1814 | # 02111-1307, USA. |
| 1815 | |
| 1816 | # serial 3 |
| 1817 | |
| 1818 | # AM_SANITY_CHECK |
| 1819 | # --------------- |
| 1820 | AC_DEFUN([AM_SANITY_CHECK], |
| 1821 | [AC_MSG_CHECKING([whether build environment is sane]) |
| 1822 | # Just in case |
| 1823 | sleep 1 |
| 1824 | echo timestamp > conftest.file |
| 1825 | # Do `set' in a subshell so we don't clobber the current shell's |
| 1826 | # arguments. Must try -L first in case configure is actually a |
| 1827 | # symlink; some systems play weird games with the mod time of symlinks |
| 1828 | # (eg FreeBSD returns the mod time of the symlink's containing |
| 1829 | # directory). |
| 1830 | if ( |
| 1831 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` |
| 1832 | if test "$[*]" = "X"; then |
| 1833 | # -L didn't work. |
| 1834 | set X `ls -t $srcdir/configure conftest.file` |
| 1835 | fi |
| 1836 | rm -f conftest.file |
| 1837 | if test "$[*]" != "X $srcdir/configure conftest.file" \ |
| 1838 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
| 1839 | |
| 1840 | # If neither matched, then we have a broken ls. This can happen |
| 1841 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
| 1842 | # broken ls alias from the environment. This has actually |
| 1843 | # happened. Such a system could not be considered "sane". |
| 1844 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
| 1845 | alias in your environment]) |
| 1846 | fi |
| 1847 | |
| 1848 | test "$[2]" = conftest.file |
| 1849 | ) |
| 1850 | then |
| 1851 | # Ok. |
| 1852 | : |
| 1853 | else |
| 1854 | AC_MSG_ERROR([newly created file is older than distributed files! |
| 1855 | Check your system clock]) |
| 1856 | fi |
| 1857 | AC_MSG_RESULT(yes)]) |
| 1858 | |
| 1859 | # AM_PROG_INSTALL_STRIP |
| 1860 | |
| 1861 | # Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
| 1862 | |
| 1863 | # This program is free software; you can redistribute it and/or modify |
| 1864 | # it under the terms of the GNU General Public License as published by |
| 1865 | # the Free Software Foundation; either version 2, or (at your option) |
| 1866 | # any later version. |
| 1867 | |
| 1868 | # This program is distributed in the hope that it will be useful, |
| 1869 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1870 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1871 | # GNU General Public License for more details. |
| 1872 | |
| 1873 | # You should have received a copy of the GNU General Public License |
| 1874 | # along with this program; if not, write to the Free Software |
| 1875 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 1876 | # 02111-1307, USA. |
| 1877 | |
| 1878 | # One issue with vendor `install' (even GNU) is that you can't |
| 1879 | # specify the program used to strip binaries. This is especially |
| 1880 | # annoying in cross-compiling environments, where the build's strip |
| 1881 | # is unlikely to handle the host's binaries. |
| 1882 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
| 1883 | # always use install-sh in `make install-strip', and initialize |
| 1884 | # STRIPPROG with the value of the STRIP variable (set by the user). |
| 1885 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
| 1886 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
| 1887 | # Installed binaries are usually stripped using `strip' when the user |
| 1888 | # run `make install-strip'. However `strip' might not be the right |
| 1889 | # tool to use in cross-compilation environments, therefore Automake |
| 1890 | # will honor the `STRIP' environment variable to overrule this program. |
| 1891 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
| 1892 | if test "$cross_compiling" != no; then |
| 1893 | AC_CHECK_TOOL([STRIP], [strip], :) |
| 1894 | fi |
| 1895 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" |
| 1896 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
| 1897 | |
| 1898 | m4_include([../config/acx.m4]) |
| 1899 | m4_include([../config/gettext.m4]) |