| 1 | | dnl aclocal.m4 generated automatically by aclocal 1.4-p6 |
|---|
| 2 | | |
|---|
| 3 | | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
|---|
| 4 | | dnl This file is free software; the Free Software Foundation |
|---|
| 5 | | dnl gives unlimited permission to copy and/or distribute it, |
|---|
| 6 | | dnl with or without modifications, as long as this notice is preserved. |
|---|
| 7 | | |
|---|
| 8 | | dnl This program is distributed in the hope that it will be useful, |
|---|
| 9 | | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
|---|
| 10 | | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
|---|
| 11 | | dnl PARTICULAR PURPOSE. |
|---|
| 12 | | |
|---|
| 13 | | #serial 3 |
|---|
| 14 | | |
|---|
| 15 | | dnl From Jim Meyering |
|---|
| 16 | | |
|---|
| 17 | | dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared -- |
|---|
| 18 | | dnl usually in <utime.h>. |
|---|
| 19 | | dnl Some systems have utime.h but don't declare the struct anywhere. |
|---|
| 20 | | |
|---|
| 21 | | AC_DEFUN(jm_CHECK_TYPE_STRUCT_UTIMBUF, |
|---|
| 22 | | [ |
|---|
| 23 | | AC_CHECK_HEADERS(utime.h) |
|---|
| 24 | | AC_REQUIRE([AC_HEADER_TIME]) |
|---|
| 25 | | AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf, |
|---|
| 26 | | [AC_TRY_COMPILE( |
|---|
| 27 | | [ |
|---|
| 28 | | #ifdef TIME_WITH_SYS_TIME |
|---|
| 29 | | # include <sys/time.h> |
|---|
| 30 | | # include <time.h> |
|---|
| 31 | | #else |
|---|
| 32 | | # ifdef HAVE_SYS_TIME_H |
|---|
| 33 | | # include <sys/time.h> |
|---|
| 34 | | # else |
|---|
| 35 | | # include <time.h> |
|---|
| 36 | | # endif |
|---|
| 37 | | #endif |
|---|
| 38 | | #ifdef HAVE_UTIME_H |
|---|
| 39 | | # include <utime.h> |
|---|
| 40 | | #endif |
|---|
| 41 | | ], |
|---|
| 42 | | [static struct utimbuf x; x.actime = x.modtime;], |
|---|
| 43 | | fu_cv_sys_struct_utimbuf=yes, |
|---|
| 44 | | fu_cv_sys_struct_utimbuf=no) |
|---|
| 45 | | ]) |
|---|
| 46 | | |
|---|
| 47 | | if test $fu_cv_sys_struct_utimbuf = yes; then |
|---|
| 48 | | AC_DEFINE_UNQUOTED(HAVE_STRUCT_UTIMBUF, 1, |
|---|
| 49 | | [Define if struct utimbuf is declared -- usually in <utime.h>. |
|---|
| 50 | | Some systems have utime.h but don't declare the struct anywhere. ]) |
|---|
| 51 | | fi |
|---|
| 52 | | ]) |
|---|
| 53 | | |
|---|
| 54 | | # lib-prefix.m4 serial 3 (gettext-0.13) |
|---|
| 55 | | dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. |
|---|
| 56 | | dnl This file is free software, distributed under the terms of the GNU |
|---|
| 57 | | dnl General Public License. As a special exception to the GNU General |
|---|
| 58 | | dnl Public License, this file may be distributed as part of a program |
|---|
| 59 | | dnl that contains a configuration script generated by Autoconf, under |
|---|
| 60 | | dnl the same distribution terms as the rest of that program. |
|---|
| 61 | | |
|---|
| 62 | | dnl From Bruno Haible. |
|---|
| 63 | | |
|---|
| 64 | | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and |
|---|
| 65 | | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't |
|---|
| 66 | | dnl require excessive bracketing. |
|---|
| 67 | | ifdef([AC_HELP_STRING], |
|---|
| 68 | | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], |
|---|
| 69 | | [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) |
|---|
| 70 | | |
|---|
| 71 | | dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed |
|---|
| 72 | | dnl to access previously installed libraries. The basic assumption is that |
|---|
| 73 | | dnl a user will want packages to use other packages he previously installed |
|---|
| 74 | | dnl with the same --prefix option. |
|---|
| 75 | | dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate |
|---|
| 76 | | dnl libraries, but is otherwise very convenient. |
|---|
| 77 | | AC_DEFUN([AC_LIB_PREFIX], |
|---|
| 78 | | [ |
|---|
| 79 | | AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) |
|---|
| 80 | | AC_REQUIRE([AC_PROG_CC]) |
|---|
| 81 | | AC_REQUIRE([AC_CANONICAL_HOST]) |
|---|
| 82 | | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 83 | | dnl By default, look in $includedir and $libdir. |
|---|
| 84 | | use_additional=yes |
|---|
| 85 | | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 86 | | eval additional_includedir=\"$includedir\" |
|---|
| 87 | | eval additional_libdir=\"$libdir\" |
|---|
| 88 | | ]) |
|---|
| 89 | | AC_LIB_ARG_WITH([lib-prefix], |
|---|
| 90 | | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib |
|---|
| 91 | | --without-lib-prefix don't search for libraries in includedir and libdir], |
|---|
| 92 | | [ |
|---|
| 93 | | if test "X$withval" = "Xno"; then |
|---|
| 94 | | use_additional=no |
|---|
| 95 | | else |
|---|
| 96 | | if test "X$withval" = "X"; then |
|---|
| 97 | | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 98 | | eval additional_includedir=\"$includedir\" |
|---|
| 99 | | eval additional_libdir=\"$libdir\" |
|---|
| 100 | | ]) |
|---|
| 101 | | else |
|---|
| 102 | | additional_includedir="$withval/include" |
|---|
| 103 | | additional_libdir="$withval/lib" |
|---|
| 104 | | fi |
|---|
| 105 | | fi |
|---|
| 106 | | ]) |
|---|
| 107 | | if test $use_additional = yes; then |
|---|
| 108 | | dnl Potentially add $additional_includedir to $CPPFLAGS. |
|---|
| 109 | | dnl But don't add it |
|---|
| 110 | | dnl 1. if it's the standard /usr/include, |
|---|
| 111 | | dnl 2. if it's already present in $CPPFLAGS, |
|---|
| 112 | | dnl 3. if it's /usr/local/include and we are using GCC on Linux, |
|---|
| 113 | | dnl 4. if it doesn't exist as a directory. |
|---|
| 114 | | if test "X$additional_includedir" != "X/usr/include"; then |
|---|
| 115 | | haveit= |
|---|
| 116 | | for x in $CPPFLAGS; do |
|---|
| 117 | | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 118 | | if test "X$x" = "X-I$additional_includedir"; then |
|---|
| 119 | | haveit=yes |
|---|
| 120 | | break |
|---|
| 121 | | fi |
|---|
| 122 | | done |
|---|
| 123 | | if test -z "$haveit"; then |
|---|
| 124 | | if test "X$additional_includedir" = "X/usr/local/include"; then |
|---|
| 125 | | if test -n "$GCC"; then |
|---|
| 126 | | case $host_os in |
|---|
| 127 | | linux*) haveit=yes;; |
|---|
| 128 | | esac |
|---|
| 129 | | fi |
|---|
| 130 | | fi |
|---|
| 131 | | if test -z "$haveit"; then |
|---|
| 132 | | if test -d "$additional_includedir"; then |
|---|
| 133 | | dnl Really add $additional_includedir to $CPPFLAGS. |
|---|
| 134 | | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" |
|---|
| 135 | | fi |
|---|
| 136 | | fi |
|---|
| 137 | | fi |
|---|
| 138 | | fi |
|---|
| 139 | | dnl Potentially add $additional_libdir to $LDFLAGS. |
|---|
| 140 | | dnl But don't add it |
|---|
| 141 | | dnl 1. if it's the standard /usr/lib, |
|---|
| 142 | | dnl 2. if it's already present in $LDFLAGS, |
|---|
| 143 | | dnl 3. if it's /usr/local/lib and we are using GCC on Linux, |
|---|
| 144 | | dnl 4. if it doesn't exist as a directory. |
|---|
| 145 | | if test "X$additional_libdir" != "X/usr/lib"; then |
|---|
| 146 | | haveit= |
|---|
| 147 | | for x in $LDFLAGS; do |
|---|
| 148 | | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 149 | | if test "X$x" = "X-L$additional_libdir"; then |
|---|
| 150 | | haveit=yes |
|---|
| 151 | | break |
|---|
| 152 | | fi |
|---|
| 153 | | done |
|---|
| 154 | | if test -z "$haveit"; then |
|---|
| 155 | | if test "X$additional_libdir" = "X/usr/local/lib"; then |
|---|
| 156 | | if test -n "$GCC"; then |
|---|
| 157 | | case $host_os in |
|---|
| 158 | | linux*) haveit=yes;; |
|---|
| 159 | | esac |
|---|
| 160 | | fi |
|---|
| 161 | | fi |
|---|
| 162 | | if test -z "$haveit"; then |
|---|
| 163 | | if test -d "$additional_libdir"; then |
|---|
| 164 | | dnl Really add $additional_libdir to $LDFLAGS. |
|---|
| 165 | | LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" |
|---|
| 166 | | fi |
|---|
| 167 | | fi |
|---|
| 168 | | fi |
|---|
| 169 | | fi |
|---|
| 170 | | fi |
|---|
| 171 | | ]) |
|---|
| 172 | | |
|---|
| 173 | | dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, |
|---|
| 174 | | dnl acl_final_exec_prefix, containing the values to which $prefix and |
|---|
| 175 | | dnl $exec_prefix will expand at the end of the configure script. |
|---|
| 176 | | AC_DEFUN([AC_LIB_PREPARE_PREFIX], |
|---|
| 177 | | [ |
|---|
| 178 | | dnl Unfortunately, prefix and exec_prefix get only finally determined |
|---|
| 179 | | dnl at the end of configure. |
|---|
| 180 | | if test "X$prefix" = "XNONE"; then |
|---|
| 181 | | acl_final_prefix="$ac_default_prefix" |
|---|
| 182 | | else |
|---|
| 183 | | acl_final_prefix="$prefix" |
|---|
| 184 | | fi |
|---|
| 185 | | if test "X$exec_prefix" = "XNONE"; then |
|---|
| 186 | | acl_final_exec_prefix='${prefix}' |
|---|
| 187 | | else |
|---|
| 188 | | acl_final_exec_prefix="$exec_prefix" |
|---|
| 189 | | fi |
|---|
| 190 | | acl_save_prefix="$prefix" |
|---|
| 191 | | prefix="$acl_final_prefix" |
|---|
| 192 | | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" |
|---|
| 193 | | prefix="$acl_save_prefix" |
|---|
| 194 | | ]) |
|---|
| 195 | | |
|---|
| 196 | | dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the |
|---|
| 197 | | dnl variables prefix and exec_prefix bound to the values they will have |
|---|
| 198 | | dnl at the end of the configure script. |
|---|
| 199 | | AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], |
|---|
| 200 | | [ |
|---|
| 201 | | acl_save_prefix="$prefix" |
|---|
| 202 | | prefix="$acl_final_prefix" |
|---|
| 203 | | acl_save_exec_prefix="$exec_prefix" |
|---|
| 204 | | exec_prefix="$acl_final_exec_prefix" |
|---|
| 205 | | $1 |
|---|
| 206 | | exec_prefix="$acl_save_exec_prefix" |
|---|
| 207 | | prefix="$acl_save_prefix" |
|---|
| 208 | | ]) |
|---|
| 209 | | |
|---|
| 210 | | # lib-link.m4 serial 4 (gettext-0.12) |
|---|
| 211 | | dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. |
|---|
| 212 | | dnl This file is free software, distributed under the terms of the GNU |
|---|
| 213 | | dnl General Public License. As a special exception to the GNU General |
|---|
| 214 | | dnl Public License, this file may be distributed as part of a program |
|---|
| 215 | | dnl that contains a configuration script generated by Autoconf, under |
|---|
| 216 | | dnl the same distribution terms as the rest of that program. |
|---|
| 217 | | |
|---|
| 218 | | dnl From Bruno Haible. |
|---|
| 219 | | |
|---|
| 220 | | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
|---|
| 221 | | dnl the libraries corresponding to explicit and implicit dependencies. |
|---|
| 222 | | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and |
|---|
| 223 | | dnl augments the CPPFLAGS variable. |
|---|
| 224 | | AC_DEFUN([AC_LIB_LINKFLAGS], |
|---|
| 225 | | [ |
|---|
| 226 | | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 227 | | AC_REQUIRE([AC_LIB_RPATH]) |
|---|
| 228 | | define([Name],[translit([$1],[./-], [___])]) |
|---|
| 229 | | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|---|
| 230 | | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|---|
| 231 | | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
|---|
| 232 | | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
|---|
| 233 | | ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
|---|
| 234 | | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
|---|
| 235 | | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
|---|
| 236 | | ]) |
|---|
| 237 | | LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
|---|
| 238 | | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
|---|
| 239 | | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
|---|
| 240 | | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
|---|
| 241 | | AC_SUBST([LIB]NAME) |
|---|
| 242 | | AC_SUBST([LTLIB]NAME) |
|---|
| 243 | | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
|---|
| 244 | | dnl results of this search when this library appears as a dependency. |
|---|
| 245 | | HAVE_LIB[]NAME=yes |
|---|
| 246 | | undefine([Name]) |
|---|
| 247 | | undefine([NAME]) |
|---|
| 248 | | ]) |
|---|
| 249 | | |
|---|
| 250 | | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) |
|---|
| 251 | | dnl searches for libname and the libraries corresponding to explicit and |
|---|
| 252 | | dnl implicit dependencies, together with the specified include files and |
|---|
| 253 | | dnl the ability to compile and link the specified testcode. If found, it |
|---|
| 254 | | dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and |
|---|
| 255 | | dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and |
|---|
| 256 | | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
|---|
| 257 | | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
|---|
| 258 | | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
|---|
| 259 | | [ |
|---|
| 260 | | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 261 | | AC_REQUIRE([AC_LIB_RPATH]) |
|---|
| 262 | | define([Name],[translit([$1],[./-], [___])]) |
|---|
| 263 | | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|---|
| 264 | | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|---|
| 265 | | |
|---|
| 266 | | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
|---|
| 267 | | dnl accordingly. |
|---|
| 268 | | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
|---|
| 269 | | |
|---|
| 270 | | dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, |
|---|
| 271 | | dnl because if the user has installed lib[]Name and not disabled its use |
|---|
| 272 | | dnl via --without-lib[]Name-prefix, he wants to use it. |
|---|
| 273 | | ac_save_CPPFLAGS="$CPPFLAGS" |
|---|
| 274 | | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
|---|
| 275 | | |
|---|
| 276 | | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
|---|
| 277 | | ac_save_LIBS="$LIBS" |
|---|
| 278 | | LIBS="$LIBS $LIB[]NAME" |
|---|
| 279 | | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
|---|
| 280 | | LIBS="$ac_save_LIBS" |
|---|
| 281 | | ]) |
|---|
| 282 | | if test "$ac_cv_lib[]Name" = yes; then |
|---|
| 283 | | HAVE_LIB[]NAME=yes |
|---|
| 284 | | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
|---|
| 285 | | AC_MSG_CHECKING([how to link with lib[]$1]) |
|---|
| 286 | | AC_MSG_RESULT([$LIB[]NAME]) |
|---|
| 287 | | else |
|---|
| 288 | | HAVE_LIB[]NAME=no |
|---|
| 289 | | dnl If $LIB[]NAME didn't lead to a usable library, we don't need |
|---|
| 290 | | dnl $INC[]NAME either. |
|---|
| 291 | | CPPFLAGS="$ac_save_CPPFLAGS" |
|---|
| 292 | | LIB[]NAME= |
|---|
| 293 | | LTLIB[]NAME= |
|---|
| 294 | | fi |
|---|
| 295 | | AC_SUBST([HAVE_LIB]NAME) |
|---|
| 296 | | AC_SUBST([LIB]NAME) |
|---|
| 297 | | AC_SUBST([LTLIB]NAME) |
|---|
| 298 | | undefine([Name]) |
|---|
| 299 | | undefine([NAME]) |
|---|
| 300 | | ]) |
|---|
| 301 | | |
|---|
| 302 | | dnl Determine the platform dependent parameters needed to use rpath: |
|---|
| 303 | | dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, |
|---|
| 304 | | dnl hardcode_direct, hardcode_minus_L. |
|---|
| 305 | | AC_DEFUN([AC_LIB_RPATH], |
|---|
| 306 | | [ |
|---|
| 307 | | AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS |
|---|
| 308 | | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
|---|
| 309 | | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
|---|
| 310 | | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
|---|
| 311 | | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ |
|---|
| 312 | | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
|---|
| 313 | | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
|---|
| 314 | | . ./conftest.sh |
|---|
| 315 | | rm -f ./conftest.sh |
|---|
| 316 | | acl_cv_rpath=done |
|---|
| 317 | | ]) |
|---|
| 318 | | wl="$acl_cv_wl" |
|---|
| 319 | | libext="$acl_cv_libext" |
|---|
| 320 | | shlibext="$acl_cv_shlibext" |
|---|
| 321 | | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
|---|
| 322 | | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
|---|
| 323 | | hardcode_direct="$acl_cv_hardcode_direct" |
|---|
| 324 | | hardcode_minus_L="$acl_cv_hardcode_minus_L" |
|---|
| 325 | | dnl Determine whether the user wants rpath handling at all. |
|---|
| 326 | | AC_ARG_ENABLE(rpath, |
|---|
| 327 | | [ --disable-rpath do not hardcode runtime library paths], |
|---|
| 328 | | :, enable_rpath=yes) |
|---|
| 329 | | ]) |
|---|
| 330 | | |
|---|
| 331 | | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and |
|---|
| 332 | | dnl the libraries corresponding to explicit and implicit dependencies. |
|---|
| 333 | | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
|---|
| 334 | | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
|---|
| 335 | | [ |
|---|
| 336 | | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|---|
| 337 | | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|---|
| 338 | | dnl By default, look in $includedir and $libdir. |
|---|
| 339 | | use_additional=yes |
|---|
| 340 | | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 341 | | eval additional_includedir=\"$includedir\" |
|---|
| 342 | | eval additional_libdir=\"$libdir\" |
|---|
| 343 | | ]) |
|---|
| 344 | | AC_LIB_ARG_WITH([lib$1-prefix], |
|---|
| 345 | | [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib |
|---|
| 346 | | --without-lib$1-prefix don't search for lib$1 in includedir and libdir], |
|---|
| 347 | | [ |
|---|
| 348 | | if test "X$withval" = "Xno"; then |
|---|
| 349 | | use_additional=no |
|---|
| 350 | | else |
|---|
| 351 | | if test "X$withval" = "X"; then |
|---|
| 352 | | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 353 | | eval additional_includedir=\"$includedir\" |
|---|
| 354 | | eval additional_libdir=\"$libdir\" |
|---|
| 355 | | ]) |
|---|
| 356 | | else |
|---|
| 357 | | additional_includedir="$withval/include" |
|---|
| 358 | | additional_libdir="$withval/lib" |
|---|
| 359 | | fi |
|---|
| 360 | | fi |
|---|
| 361 | | ]) |
|---|
| 362 | | dnl Search the library and its dependencies in $additional_libdir and |
|---|
| 363 | | dnl $LDFLAGS. Using breadth-first-seach. |
|---|
| 364 | | LIB[]NAME= |
|---|
| 365 | | LTLIB[]NAME= |
|---|
| 366 | | INC[]NAME= |
|---|
| 367 | | rpathdirs= |
|---|
| 368 | | ltrpathdirs= |
|---|
| 369 | | names_already_handled= |
|---|
| 370 | | names_next_round='$1 $2' |
|---|
| 371 | | while test -n "$names_next_round"; do |
|---|
| 372 | | names_this_round="$names_next_round" |
|---|
| 373 | | names_next_round= |
|---|
| 374 | | for name in $names_this_round; do |
|---|
| 375 | | already_handled= |
|---|
| 376 | | for n in $names_already_handled; do |
|---|
| 377 | | if test "$n" = "$name"; then |
|---|
| 378 | | already_handled=yes |
|---|
| 379 | | break |
|---|
| 380 | | fi |
|---|
| 381 | | done |
|---|
| 382 | | if test -z "$already_handled"; then |
|---|
| 383 | | names_already_handled="$names_already_handled $name" |
|---|
| 384 | | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
|---|
| 385 | | dnl or AC_LIB_HAVE_LINKFLAGS call. |
|---|
| 386 | | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
|---|
| 387 | | eval value=\"\$HAVE_LIB$uppername\" |
|---|
| 388 | | if test -n "$value"; then |
|---|
| 389 | | if test "$value" = yes; then |
|---|
| 390 | | eval value=\"\$LIB$uppername\" |
|---|
| 391 | | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
|---|
| 392 | | eval value=\"\$LTLIB$uppername\" |
|---|
| 393 | | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
|---|
| 394 | | else |
|---|
| 395 | | dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined |
|---|
| 396 | | dnl that this library doesn't exist. So just drop it. |
|---|
| 397 | | : |
|---|
| 398 | | fi |
|---|
| 399 | | else |
|---|
| 400 | | dnl Search the library lib$name in $additional_libdir and $LDFLAGS |
|---|
| 401 | | dnl and the already constructed $LIBNAME/$LTLIBNAME. |
|---|
| 402 | | found_dir= |
|---|
| 403 | | found_la= |
|---|
| 404 | | found_so= |
|---|
| 405 | | found_a= |
|---|
| 406 | | if test $use_additional = yes; then |
|---|
| 407 | | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then |
|---|
| 408 | | found_dir="$additional_libdir" |
|---|
| 409 | | found_so="$additional_libdir/lib$name.$shlibext" |
|---|
| 410 | | if test -f "$additional_libdir/lib$name.la"; then |
|---|
| 411 | | found_la="$additional_libdir/lib$name.la" |
|---|
| 412 | | fi |
|---|
| 413 | | else |
|---|
| 414 | | if test -f "$additional_libdir/lib$name.$libext"; then |
|---|
| 415 | | found_dir="$additional_libdir" |
|---|
| 416 | | found_a="$additional_libdir/lib$name.$libext" |
|---|
| 417 | | if test -f "$additional_libdir/lib$name.la"; then |
|---|
| 418 | | found_la="$additional_libdir/lib$name.la" |
|---|
| 419 | | fi |
|---|
| 420 | | fi |
|---|
| 421 | | fi |
|---|
| 422 | | fi |
|---|
| 423 | | if test "X$found_dir" = "X"; then |
|---|
| 424 | | for x in $LDFLAGS $LTLIB[]NAME; do |
|---|
| 425 | | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 426 | | case "$x" in |
|---|
| 427 | | -L*) |
|---|
| 428 | | dir=`echo "X$x" | sed -e 's/^X-L//'` |
|---|
| 429 | | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then |
|---|
| 430 | | found_dir="$dir" |
|---|
| 431 | | found_so="$dir/lib$name.$shlibext" |
|---|
| 432 | | if test -f "$dir/lib$name.la"; then |
|---|
| 433 | | found_la="$dir/lib$name.la" |
|---|
| 434 | | fi |
|---|
| 435 | | else |
|---|
| 436 | | if test -f "$dir/lib$name.$libext"; then |
|---|
| 437 | | found_dir="$dir" |
|---|
| 438 | | found_a="$dir/lib$name.$libext" |
|---|
| 439 | | if test -f "$dir/lib$name.la"; then |
|---|
| 440 | | found_la="$dir/lib$name.la" |
|---|
| 441 | | fi |
|---|
| 442 | | fi |
|---|
| 443 | | fi |
|---|
| 444 | | ;; |
|---|
| 445 | | esac |
|---|
| 446 | | if test "X$found_dir" != "X"; then |
|---|
| 447 | | break |
|---|
| 448 | | fi |
|---|
| 449 | | done |
|---|
| 450 | | fi |
|---|
| 451 | | if test "X$found_dir" != "X"; then |
|---|
| 452 | | dnl Found the library. |
|---|
| 453 | | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
|---|
| 454 | | if test "X$found_so" != "X"; then |
|---|
| 455 | | dnl Linking with a shared library. We attempt to hardcode its |
|---|
| 456 | | dnl directory into the executable's runpath, unless it's the |
|---|
| 457 | | dnl standard /usr/lib. |
|---|
| 458 | | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
|---|
| 459 | | dnl No hardcoding is needed. |
|---|
| 460 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 461 | | else |
|---|
| 462 | | dnl Use an explicit option to hardcode DIR into the resulting |
|---|
| 463 | | dnl binary. |
|---|
| 464 | | dnl Potentially add DIR to ltrpathdirs. |
|---|
| 465 | | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
|---|
| 466 | | haveit= |
|---|
| 467 | | for x in $ltrpathdirs; do |
|---|
| 468 | | if test "X$x" = "X$found_dir"; then |
|---|
| 469 | | haveit=yes |
|---|
| 470 | | break |
|---|
| 471 | | fi |
|---|
| 472 | | done |
|---|
| 473 | | if test -z "$haveit"; then |
|---|
| 474 | | ltrpathdirs="$ltrpathdirs $found_dir" |
|---|
| 475 | | fi |
|---|
| 476 | | dnl The hardcoding into $LIBNAME is system dependent. |
|---|
| 477 | | if test "$hardcode_direct" = yes; then |
|---|
| 478 | | dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
|---|
| 479 | | dnl resulting binary. |
|---|
| 480 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 481 | | else |
|---|
| 482 | | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
|---|
| 483 | | dnl Use an explicit option to hardcode DIR into the resulting |
|---|
| 484 | | dnl binary. |
|---|
| 485 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 486 | | dnl Potentially add DIR to rpathdirs. |
|---|
| 487 | | dnl The rpathdirs will be appended to $LIBNAME at the end. |
|---|
| 488 | | haveit= |
|---|
| 489 | | for x in $rpathdirs; do |
|---|
| 490 | | if test "X$x" = "X$found_dir"; then |
|---|
| 491 | | haveit=yes |
|---|
| 492 | | break |
|---|
| 493 | | fi |
|---|
| 494 | | done |
|---|
| 495 | | if test -z "$haveit"; then |
|---|
| 496 | | rpathdirs="$rpathdirs $found_dir" |
|---|
| 497 | | fi |
|---|
| 498 | | else |
|---|
| 499 | | dnl Rely on "-L$found_dir". |
|---|
| 500 | | dnl But don't add it if it's already contained in the LDFLAGS |
|---|
| 501 | | dnl or the already constructed $LIBNAME |
|---|
| 502 | | haveit= |
|---|
| 503 | | for x in $LDFLAGS $LIB[]NAME; do |
|---|
| 504 | | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 505 | | if test "X$x" = "X-L$found_dir"; then |
|---|
| 506 | | haveit=yes |
|---|
| 507 | | break |
|---|
| 508 | | fi |
|---|
| 509 | | done |
|---|
| 510 | | if test -z "$haveit"; then |
|---|
| 511 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
|---|
| 512 | | fi |
|---|
| 513 | | if test "$hardcode_minus_L" != no; then |
|---|
| 514 | | dnl FIXME: Not sure whether we should use |
|---|
| 515 | | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
|---|
| 516 | | dnl here. |
|---|
| 517 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 518 | | else |
|---|
| 519 | | dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH |
|---|
| 520 | | dnl here, because this doesn't fit in flags passed to the |
|---|
| 521 | | dnl compiler. So give up. No hardcoding. This affects only |
|---|
| 522 | | dnl very old systems. |
|---|
| 523 | | dnl FIXME: Not sure whether we should use |
|---|
| 524 | | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
|---|
| 525 | | dnl here. |
|---|
| 526 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
|---|
| 527 | | fi |
|---|
| 528 | | fi |
|---|
| 529 | | fi |
|---|
| 530 | | fi |
|---|
| 531 | | else |
|---|
| 532 | | if test "X$found_a" != "X"; then |
|---|
| 533 | | dnl Linking with a static library. |
|---|
| 534 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
|---|
| 535 | | else |
|---|
| 536 | | dnl We shouldn't come here, but anyway it's good to have a |
|---|
| 537 | | dnl fallback. |
|---|
| 538 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
|---|
| 539 | | fi |
|---|
| 540 | | fi |
|---|
| 541 | | dnl Assume the include files are nearby. |
|---|
| 542 | | additional_includedir= |
|---|
| 543 | | case "$found_dir" in |
|---|
| 544 | | */lib | */lib/) |
|---|
| 545 | | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
|---|
| 546 | | additional_includedir="$basedir/include" |
|---|
| 547 | | ;; |
|---|
| 548 | | esac |
|---|
| 549 | | if test "X$additional_includedir" != "X"; then |
|---|
| 550 | | dnl Potentially add $additional_includedir to $INCNAME. |
|---|
| 551 | | dnl But don't add it |
|---|
| 552 | | dnl 1. if it's the standard /usr/include, |
|---|
| 553 | | dnl 2. if it's /usr/local/include and we are using GCC on Linux, |
|---|
| 554 | | dnl 3. if it's already present in $CPPFLAGS or the already |
|---|
| 555 | | dnl constructed $INCNAME, |
|---|
| 556 | | dnl 4. if it doesn't exist as a directory. |
|---|
| 557 | | if test "X$additional_includedir" != "X/usr/include"; then |
|---|
| 558 | | haveit= |
|---|
| 559 | | if test "X$additional_includedir" = "X/usr/local/include"; then |
|---|
| 560 | | if test -n "$GCC"; then |
|---|
| 561 | | case $host_os in |
|---|
| 562 | | linux*) haveit=yes;; |
|---|
| 563 | | esac |
|---|
| 564 | | fi |
|---|
| 565 | | fi |
|---|
| 566 | | if test -z "$haveit"; then |
|---|
| 567 | | for x in $CPPFLAGS $INC[]NAME; do |
|---|
| 568 | | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 569 | | if test "X$x" = "X-I$additional_includedir"; then |
|---|
| 570 | | haveit=yes |
|---|
| 571 | | break |
|---|
| 572 | | fi |
|---|
| 573 | | done |
|---|
| 574 | | if test -z "$haveit"; then |
|---|
| 575 | | if test -d "$additional_includedir"; then |
|---|
| 576 | | dnl Really add $additional_includedir to $INCNAME. |
|---|
| 577 | | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" |
|---|
| 578 | | fi |
|---|
| 579 | | fi |
|---|
| 580 | | fi |
|---|
| 581 | | fi |
|---|
| 582 | | fi |
|---|
| 583 | | dnl Look for dependencies. |
|---|
| 584 | | if test -n "$found_la"; then |
|---|
| 585 | | dnl Read the .la file. It defines the variables |
|---|
| 586 | | dnl dlname, library_names, old_library, dependency_libs, current, |
|---|
| 587 | | dnl age, revision, installed, dlopen, dlpreopen, libdir. |
|---|
| 588 | | save_libdir="$libdir" |
|---|
| 589 | | case "$found_la" in |
|---|
| 590 | | */* | *\\*) . "$found_la" ;; |
|---|
| 591 | | *) . "./$found_la" ;; |
|---|
| 592 | | esac |
|---|
| 593 | | libdir="$save_libdir" |
|---|
| 594 | | dnl We use only dependency_libs. |
|---|
| 595 | | for dep in $dependency_libs; do |
|---|
| 596 | | case "$dep" in |
|---|
| 597 | | -L*) |
|---|
| 598 | | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
|---|
| 599 | | dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. |
|---|
| 600 | | dnl But don't add it |
|---|
| 601 | | dnl 1. if it's the standard /usr/lib, |
|---|
| 602 | | dnl 2. if it's /usr/local/lib and we are using GCC on Linux, |
|---|
| 603 | | dnl 3. if it's already present in $LDFLAGS or the already |
|---|
| 604 | | dnl constructed $LIBNAME, |
|---|
| 605 | | dnl 4. if it doesn't exist as a directory. |
|---|
| 606 | | if test "X$additional_libdir" != "X/usr/lib"; then |
|---|
| 607 | | haveit= |
|---|
| 608 | | if test "X$additional_libdir" = "X/usr/local/lib"; then |
|---|
| 609 | | if test -n "$GCC"; then |
|---|
| 610 | | case $host_os in |
|---|
| 611 | | linux*) haveit=yes;; |
|---|
| 612 | | esac |
|---|
| 613 | | fi |
|---|
| 614 | | fi |
|---|
| 615 | | if test -z "$haveit"; then |
|---|
| 616 | | haveit= |
|---|
| 617 | | for x in $LDFLAGS $LIB[]NAME; do |
|---|
| 618 | | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 619 | | if test "X$x" = "X-L$additional_libdir"; then |
|---|
| 620 | | haveit=yes |
|---|
| 621 | | break |
|---|
| 622 | | fi |
|---|
| 623 | | done |
|---|
| 624 | | if test -z "$haveit"; then |
|---|
| 625 | | if test -d "$additional_libdir"; then |
|---|
| 626 | | dnl Really add $additional_libdir to $LIBNAME. |
|---|
| 627 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
|---|
| 628 | | fi |
|---|
| 629 | | fi |
|---|
| 630 | | haveit= |
|---|
| 631 | | for x in $LDFLAGS $LTLIB[]NAME; do |
|---|
| 632 | | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 633 | | if test "X$x" = "X-L$additional_libdir"; then |
|---|
| 634 | | haveit=yes |
|---|
| 635 | | break |
|---|
| 636 | | fi |
|---|
| 637 | | done |
|---|
| 638 | | if test -z "$haveit"; then |
|---|
| 639 | | if test -d "$additional_libdir"; then |
|---|
| 640 | | dnl Really add $additional_libdir to $LTLIBNAME. |
|---|
| 641 | | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
|---|
| 642 | | fi |
|---|
| 643 | | fi |
|---|
| 644 | | fi |
|---|
| 645 | | fi |
|---|
| 646 | | ;; |
|---|
| 647 | | -R*) |
|---|
| 648 | | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
|---|
| 649 | | if test "$enable_rpath" != no; then |
|---|
| 650 | | dnl Potentially add DIR to rpathdirs. |
|---|
| 651 | | dnl The rpathdirs will be appended to $LIBNAME at the end. |
|---|
| 652 | | haveit= |
|---|
| 653 | | for x in $rpathdirs; do |
|---|
| 654 | | if test "X$x" = "X$dir"; then |
|---|
| 655 | | haveit=yes |
|---|
| 656 | | break |
|---|
| 657 | | fi |
|---|
| 658 | | done |
|---|
| 659 | | if test -z "$haveit"; then |
|---|
| 660 | | rpathdirs="$rpathdirs $dir" |
|---|
| 661 | | fi |
|---|
| 662 | | dnl Potentially add DIR to ltrpathdirs. |
|---|
| 663 | | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
|---|
| 664 | | haveit= |
|---|
| 665 | | for x in $ltrpathdirs; do |
|---|
| 666 | | if test "X$x" = "X$dir"; then |
|---|
| 667 | | haveit=yes |
|---|
| 668 | | break |
|---|
| 669 | | fi |
|---|
| 670 | | done |
|---|
| 671 | | if test -z "$haveit"; then |
|---|
| 672 | | ltrpathdirs="$ltrpathdirs $dir" |
|---|
| 673 | | fi |
|---|
| 674 | | fi |
|---|
| 675 | | ;; |
|---|
| 676 | | -l*) |
|---|
| 677 | | dnl Handle this in the next round. |
|---|
| 678 | | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
|---|
| 679 | | ;; |
|---|
| 680 | | *.la) |
|---|
| 681 | | dnl Handle this in the next round. Throw away the .la's |
|---|
| 682 | | dnl directory; it is already contained in a preceding -L |
|---|
| 683 | | dnl option. |
|---|
| 684 | | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
|---|
| 685 | | ;; |
|---|
| 686 | | *) |
|---|
| 687 | | dnl Most likely an immediate library name. |
|---|
| 688 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
|---|
| 689 | | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
|---|
| 690 | | ;; |
|---|
| 691 | | esac |
|---|
| 692 | | done |
|---|
| 693 | | fi |
|---|
| 694 | | else |
|---|
| 695 | | dnl Didn't find the library; assume it is in the system directories |
|---|
| 696 | | dnl known to the linker and runtime loader. (All the system |
|---|
| 697 | | dnl directories known to the linker should also be known to the |
|---|
| 698 | | dnl runtime loader, otherwise the system is severely misconfigured.) |
|---|
| 699 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
|---|
| 700 | | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
|---|
| 701 | | fi |
|---|
| 702 | | fi |
|---|
| 703 | | fi |
|---|
| 704 | | done |
|---|
| 705 | | done |
|---|
| 706 | | if test "X$rpathdirs" != "X"; then |
|---|
| 707 | | if test -n "$hardcode_libdir_separator"; then |
|---|
| 708 | | dnl Weird platform: only the last -rpath option counts, the user must |
|---|
| 709 | | dnl pass all path elements in one option. We can arrange that for a |
|---|
| 710 | | dnl single library, but not when more than one $LIBNAMEs are used. |
|---|
| 711 | | alldirs= |
|---|
| 712 | | for found_dir in $rpathdirs; do |
|---|
| 713 | | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
|---|
| 714 | | done |
|---|
| 715 | | dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. |
|---|
| 716 | | acl_save_libdir="$libdir" |
|---|
| 717 | | libdir="$alldirs" |
|---|
| 718 | | eval flag=\"$hardcode_libdir_flag_spec\" |
|---|
| 719 | | libdir="$acl_save_libdir" |
|---|
| 720 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
|---|
| 721 | | else |
|---|
| 722 | | dnl The -rpath options are cumulative. |
|---|
| 723 | | for found_dir in $rpathdirs; do |
|---|
| 724 | | acl_save_libdir="$libdir" |
|---|
| 725 | | libdir="$found_dir" |
|---|
| 726 | | eval flag=\"$hardcode_libdir_flag_spec\" |
|---|
| 727 | | libdir="$acl_save_libdir" |
|---|
| 728 | | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
|---|
| 729 | | done |
|---|
| 730 | | fi |
|---|
| 731 | | fi |
|---|
| 732 | | if test "X$ltrpathdirs" != "X"; then |
|---|
| 733 | | dnl When using libtool, the option that works for both libraries and |
|---|
| 734 | | dnl executables is -R. The -R options are cumulative. |
|---|
| 735 | | for found_dir in $ltrpathdirs; do |
|---|
| 736 | | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
|---|
| 737 | | done |
|---|
| 738 | | fi |
|---|
| 739 | | ]) |
|---|
| 740 | | |
|---|
| 741 | | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
|---|
| 742 | | dnl unless already present in VAR. |
|---|
| 743 | | dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes |
|---|
| 744 | | dnl contains two or three consecutive elements that belong together. |
|---|
| 745 | | AC_DEFUN([AC_LIB_APPENDTOVAR], |
|---|
| 746 | | [ |
|---|
| 747 | | for element in [$2]; do |
|---|
| 748 | | haveit= |
|---|
| 749 | | for x in $[$1]; do |
|---|
| 750 | | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 751 | | if test "X$x" = "X$element"; then |
|---|
| 752 | | haveit=yes |
|---|
| 753 | | break |
|---|
| 754 | | fi |
|---|
| 755 | | done |
|---|
| 756 | | if test -z "$haveit"; then |
|---|
| 757 | | [$1]="${[$1]}${[$1]:+ }$element" |
|---|
| 758 | | fi |
|---|
| 759 | | done |
|---|
| 760 | | ]) |
|---|
| 761 | | |
|---|
| 762 | | # lib-ld.m4 serial 3 (gettext-0.13) |
|---|
| 763 | | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. |
|---|
| 764 | | dnl This file is free software, distributed under the terms of the GNU |
|---|
| 765 | | dnl General Public License. As a special exception to the GNU General |
|---|
| 766 | | dnl Public License, this file may be distributed as part of a program |
|---|
| 767 | | dnl that contains a configuration script generated by Autoconf, under |
|---|
| 768 | | dnl the same distribution terms as the rest of that program. |
|---|
| 769 | | |
|---|
| 770 | | dnl Subroutines of libtool.m4, |
|---|
| 771 | | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision |
|---|
| 772 | | dnl with libtool.m4. |
|---|
| 773 | | |
|---|
| 774 | | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. |
|---|
| 775 | | AC_DEFUN([AC_LIB_PROG_LD_GNU], |
|---|
| 776 | | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, |
|---|
| 777 | | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
|---|
| 778 | | case `$LD -v 2>&1 </dev/null` in |
|---|
| 779 | | *GNU* | *'with BFD'*) |
|---|
| 780 | | acl_cv_prog_gnu_ld=yes ;; |
|---|
| 781 | | *) |
|---|
| 782 | | acl_cv_prog_gnu_ld=no ;; |
|---|
| 783 | | esac]) |
|---|
| 784 | | with_gnu_ld=$acl_cv_prog_gnu_ld |
|---|
| 785 | | ]) |
|---|
| 786 | | |
|---|
| 787 | | dnl From libtool-1.4. Sets the variable LD. |
|---|
| 788 | | AC_DEFUN([AC_LIB_PROG_LD], |
|---|
| 789 | | [AC_ARG_WITH(gnu-ld, |
|---|
| 790 | | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
|---|
| 791 | | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
|---|
| 792 | | AC_REQUIRE([AC_PROG_CC])dnl |
|---|
| 793 | | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
|---|
| 794 | | # Prepare PATH_SEPARATOR. |
|---|
| 795 | | # The user is always right. |
|---|
| 796 | | if test "${PATH_SEPARATOR+set}" != set; then |
|---|
| 797 | | echo "#! /bin/sh" >conf$$.sh |
|---|
| 798 | | echo "exit 0" >>conf$$.sh |
|---|
| 799 | | chmod +x conf$$.sh |
|---|
| 800 | | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then |
|---|
| 801 | | PATH_SEPARATOR=';' |
|---|
| 802 | | else |
|---|
| 803 | | PATH_SEPARATOR=: |
|---|
| 804 | | fi |
|---|
| 805 | | rm -f conf$$.sh |
|---|
| 806 | | fi |
|---|
| 807 | | ac_prog=ld |
|---|
| 808 | | if test "$GCC" = yes; then |
|---|
| 809 | | # Check if gcc -print-prog-name=ld gives a path. |
|---|
| 810 | | AC_MSG_CHECKING([for ld used by GCC]) |
|---|
| 811 | | case $host in |
|---|
| 812 | | *-*-mingw*) |
|---|
| 813 | | # gcc leaves a trailing carriage return which upsets mingw |
|---|
| 814 | | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
|---|
| 815 | | *) |
|---|
| 816 | | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
|---|
| 817 | | esac |
|---|
| 818 | | case $ac_prog in |
|---|
| 819 | | # Accept absolute paths. |
|---|
| 820 | | [[\\/]* | [A-Za-z]:[\\/]*)] |
|---|
| 821 | | [re_direlt='/[^/][^/]*/\.\./'] |
|---|
| 822 | | # Canonicalize the path of ld |
|---|
| 823 | | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
|---|
| 824 | | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
|---|
| 825 | | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
|---|
| 826 | | done |
|---|
| 827 | | test -z "$LD" && LD="$ac_prog" |
|---|
| 828 | | ;; |
|---|
| 829 | | "") |
|---|
| 830 | | # If it fails, then pretend we aren't using GCC. |
|---|
| 831 | | ac_prog=ld |
|---|
| 832 | | ;; |
|---|
| 833 | | *) |
|---|
| 834 | | # If it is relative, then search for the first ld in PATH. |
|---|
| 835 | | with_gnu_ld=unknown |
|---|
| 836 | | ;; |
|---|
| 837 | | esac |
|---|
| 838 | | elif test "$with_gnu_ld" = yes; then |
|---|
| 839 | | AC_MSG_CHECKING([for GNU ld]) |
|---|
| 840 | | else |
|---|
| 841 | | AC_MSG_CHECKING([for non-GNU ld]) |
|---|
| 842 | | fi |
|---|
| 843 | | AC_CACHE_VAL(acl_cv_path_LD, |
|---|
| 844 | | [if test -z "$LD"; then |
|---|
| 845 | | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
|---|
| 846 | | for ac_dir in $PATH; do |
|---|
| 847 | | test -z "$ac_dir" && ac_dir=. |
|---|
| 848 | | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
|---|
| 849 | | acl_cv_path_LD="$ac_dir/$ac_prog" |
|---|
| 850 | | # Check to see if the program is GNU ld. I'd rather use --version, |
|---|
| 851 | | # but apparently some GNU ld's only accept -v. |
|---|
| 852 | | # Break only if it was the GNU/non-GNU ld that we prefer. |
|---|
| 853 | | case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in |
|---|
| 854 | | *GNU* | *'with BFD'*) |
|---|
| 855 | | test "$with_gnu_ld" != no && break ;; |
|---|
| 856 | | *) |
|---|
| 857 | | test "$with_gnu_ld" != yes && break ;; |
|---|
| 858 | | esac |
|---|
| 859 | | fi |
|---|
| 860 | | done |
|---|
| 861 | | IFS="$ac_save_ifs" |
|---|
| 862 | | else |
|---|
| 863 | | acl_cv_path_LD="$LD" # Let the user override the test with a path. |
|---|
| 864 | | fi]) |
|---|
| 865 | | LD="$acl_cv_path_LD" |
|---|
| 866 | | if test -n "$LD"; then |
|---|
| 867 | | AC_MSG_RESULT($LD) |
|---|
| 868 | | else |
|---|
| 869 | | AC_MSG_RESULT(no) |
|---|
| 870 | | fi |
|---|
| 871 | | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
|---|
| 872 | | AC_LIB_PROG_LD_GNU |
|---|
| 873 | | ]) |
|---|
| 874 | | |
|---|
| 875 | | # Do all the work for Automake. This macro actually does too much -- |
|---|
| 876 | | # some checks are only needed if your package does certain things. |
|---|
| 877 | | # But this isn't really a big deal. |
|---|
| 878 | | |
|---|
| 879 | | # serial 1 |
|---|
| 880 | | |
|---|
| 881 | | dnl Usage: |
|---|
| 882 | | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
|---|
| 883 | | |
|---|
| 884 | | AC_DEFUN([AM_INIT_AUTOMAKE], |
|---|
| 885 | | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
|---|
| 886 | | AC_REQUIRE([AC_PROG_INSTALL]) |
|---|
| 887 | | PACKAGE=[$1] |
|---|
| 888 | | AC_SUBST(PACKAGE) |
|---|
| 889 | | VERSION=[$2] |
|---|
| 890 | | AC_SUBST(VERSION) |
|---|
| 891 | | dnl test to see if srcdir already configured |
|---|
| 892 | | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
|---|
| 893 | | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
|---|
| 894 | | fi |
|---|
| 895 | | ifelse([$3],, |
|---|
| 896 | | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
|---|
| 897 | | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
|---|
| 898 | | AC_REQUIRE([AM_SANITY_CHECK]) |
|---|
| 899 | | AC_REQUIRE([AC_ARG_PROGRAM]) |
|---|
| 900 | | dnl FIXME This is truly gross. |
|---|
| 901 | | missing_dir=`cd $ac_aux_dir && pwd` |
|---|
| 902 | | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) |
|---|
| 903 | | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
|---|
| 904 | | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) |
|---|
| 905 | | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
|---|
| 906 | | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
|---|
| 907 | | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
|---|
| 908 | | |
|---|
| 909 | | # Copyright 2002 Free Software Foundation, Inc. |
|---|
| 910 | | |
|---|
| 911 | | # This program is free software; you can redistribute it and/or modify |
|---|
| 912 | | # it under the terms of the GNU General Public License as published by |
|---|
| 913 | | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| 914 | | # any later version. |
|---|
| 915 | | |
|---|
| 916 | | # This program is distributed in the hope that it will be useful, |
|---|
| 917 | | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 918 | | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 919 | | # GNU General Public License for more details. |
|---|
| 920 | | |
|---|
| 921 | | # You should have received a copy of the GNU General Public License |
|---|
| 922 | | # along with this program; if not, write to the Free Software |
|---|
| 923 | | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| 924 | | |
|---|
| 925 | | # AM_AUTOMAKE_VERSION(VERSION) |
|---|
| 926 | | # ---------------------------- |
|---|
| 927 | | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
|---|
| 928 | | # generated from the m4 files accompanying Automake X.Y. |
|---|
| 929 | | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) |
|---|
| 930 | | |
|---|
| 931 | | # AM_SET_CURRENT_AUTOMAKE_VERSION |
|---|
| 932 | | # ------------------------------- |
|---|
| 933 | | # Call AM_AUTOMAKE_VERSION so it can be traced. |
|---|
| 934 | | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
|---|
| 935 | | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
|---|
| 936 | | [AM_AUTOMAKE_VERSION([1.4-p6])]) |
|---|
| 937 | | |
|---|
| 938 | | # |
|---|
| 939 | | # Check to make sure that the build environment is sane. |
|---|
| 940 | | # |
|---|
| 941 | | |
|---|
| 942 | | AC_DEFUN([AM_SANITY_CHECK], |
|---|
| 943 | | [AC_MSG_CHECKING([whether build environment is sane]) |
|---|
| 944 | | # Just in case |
|---|
| 945 | | sleep 1 |
|---|
| 946 | | echo timestamp > conftestfile |
|---|
| 947 | | # Do `set' in a subshell so we don't clobber the current shell's |
|---|
| 948 | | # arguments. Must try -L first in case configure is actually a |
|---|
| 949 | | # symlink; some systems play weird games with the mod time of symlinks |
|---|
| 950 | | # (eg FreeBSD returns the mod time of the symlink's containing |
|---|
| 951 | | # directory). |
|---|
| 952 | | if ( |
|---|
| 953 | | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
|---|
| 954 | | if test "[$]*" = "X"; then |
|---|
| 955 | | # -L didn't work. |
|---|
| 956 | | set X `ls -t $srcdir/configure conftestfile` |
|---|
| 957 | | fi |
|---|
| 958 | | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
|---|
| 959 | | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
|---|
| 960 | | |
|---|
| 961 | | # If neither matched, then we have a broken ls. This can happen |
|---|
| 962 | | # if, for instance, CONFIG_SHELL is bash and it inherits a |
|---|
| 963 | | # broken ls alias from the environment. This has actually |
|---|
| 964 | | # happened. Such a system could not be considered "sane". |
|---|
| 965 | | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
|---|
| 966 | | alias in your environment]) |
|---|
| 967 | | fi |
|---|
| 968 | | |
|---|
| 969 | | test "[$]2" = conftestfile |
|---|
| 970 | | ) |
|---|
| 971 | | then |
|---|
| 972 | | # Ok. |
|---|
| 973 | | : |
|---|
| 974 | | else |
|---|
| 975 | | AC_MSG_ERROR([newly created file is older than distributed files! |
|---|
| 976 | | Check your system clock]) |
|---|
| 977 | | fi |
|---|
| 978 | | rm -f conftest* |
|---|
| 979 | | AC_MSG_RESULT(yes)]) |
|---|
| 980 | | |
|---|
| 981 | | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
|---|
| 982 | | dnl The program must properly implement --version. |
|---|
| 983 | | AC_DEFUN([AM_MISSING_PROG], |
|---|
| 984 | | [AC_MSG_CHECKING(for working $2) |
|---|
| 985 | | # Run test in a subshell; some versions of sh will print an error if |
|---|
| 986 | | # an executable is not found, even if stderr is redirected. |
|---|
| 987 | | # Redirect stdin to placate older versions of autoconf. Sigh. |
|---|
| 988 | | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
|---|
| 989 | | $1=$2 |
|---|
| 990 | | AC_MSG_RESULT(found) |
|---|
| 991 | | else |
|---|
| 992 | | $1="$3/missing $2" |
|---|
| 993 | | AC_MSG_RESULT(missing) |
|---|
| 994 | | fi |
|---|
| 995 | | AC_SUBST($1)]) |
|---|
| 996 | | |
|---|
| 997 | | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
|---|
| 998 | | |
|---|
| 999 | | AC_DEFUN([AM_CONFIG_HEADER], |
|---|
| 1000 | | [AC_PREREQ([2.12]) |
|---|
| 1001 | | AC_CONFIG_HEADER([$1]) |
|---|
| 1002 | | dnl When config.status generates a header, we must update the stamp-h file. |
|---|
| 1003 | | dnl This file resides in the same directory as the config header |
|---|
| 1004 | | dnl that is generated. We must strip everything past the first ":", |
|---|
| 1005 | | dnl and everything past the last "/". |
|---|
| 1006 | | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
|---|
| 1007 | | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
|---|
| 1008 | | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
|---|
| 1009 | | <<am_indx=1 |
|---|
| 1010 | | for am_file in <<$1>>; do |
|---|
| 1011 | | case " <<$>>CONFIG_HEADERS " in |
|---|
| 1012 | | *" <<$>>am_file "*<<)>> |
|---|
| 1013 | | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
|---|
| 1014 | | ;; |
|---|
| 1015 | | esac |
|---|
| 1016 | | am_indx=`expr "<<$>>am_indx" + 1` |
|---|
| 1017 | | done<<>>dnl>>) |
|---|
| 1018 | | changequote([,]))]) |
|---|
| | 1 | # generated automatically by aclocal 1.8.5 -*- 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. |
|---|
| | 72 | # -*- Autoconf -*- |
|---|
| | 73 | # Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
|---|
| | 74 | # Generated from amversion.in; do not edit by hand. |
|---|
| | 75 | |
|---|
| | 76 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 77 | # it under the terms of the GNU General Public License as published by |
|---|
| | 78 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 79 | # any later version. |
|---|
| | 80 | |
|---|
| | 81 | # This program is distributed in the hope that it will be useful, |
|---|
| | 82 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 83 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 84 | # GNU General Public License for more details. |
|---|
| | 85 | |
|---|
| | 86 | # You should have received a copy of the GNU General Public License |
|---|
| | 87 | # along with this program; if not, write to the Free Software |
|---|
| | 88 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 89 | |
|---|
| | 90 | # AM_AUTOMAKE_VERSION(VERSION) |
|---|
| | 91 | # ---------------------------- |
|---|
| | 92 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
|---|
| | 93 | # generated from the m4 files accompanying Automake X.Y. |
|---|
| | 94 | AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) |
|---|
| | 95 | |
|---|
| | 96 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
|---|
| | 97 | # ------------------------------- |
|---|
| | 98 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
|---|
| | 99 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
|---|
| | 100 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
|---|
| | 101 | [AM_AUTOMAKE_VERSION([1.8.5])]) |
|---|
| | 102 | |
|---|
| | 103 | # AM_AUX_DIR_EXPAND |
|---|
| | 104 | |
|---|
| | 105 | # Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
|---|
| | 106 | |
|---|
| | 107 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 108 | # it under the terms of the GNU General Public License as published by |
|---|
| | 109 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 110 | # any later version. |
|---|
| | 111 | |
|---|
| | 112 | # This program is distributed in the hope that it will be useful, |
|---|
| | 113 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 114 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 115 | # GNU General Public License for more details. |
|---|
| | 116 | |
|---|
| | 117 | # You should have received a copy of the GNU General Public License |
|---|
| | 118 | # along with this program; if not, write to the Free Software |
|---|
| | 119 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 120 | # 02111-1307, USA. |
|---|
| | 121 | |
|---|
| | 122 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
|---|
| | 123 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
|---|
| | 124 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
|---|
| | 125 | # |
|---|
| | 126 | # Of course, Automake must honor this variable whenever it calls a |
|---|
| | 127 | # tool from the auxiliary directory. The problem is that $srcdir (and |
|---|
| | 128 | # therefore $ac_aux_dir as well) can be either absolute or relative, |
|---|
| | 129 | # depending on how configure is run. This is pretty annoying, since |
|---|
| | 130 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top |
|---|
| | 131 | # source directory, any form will work fine, but in subdirectories a |
|---|
| | 132 | # relative path needs to be adjusted first. |
|---|
| | 133 | # |
|---|
| | 134 | # $ac_aux_dir/missing |
|---|
| | 135 | # fails when called from a subdirectory if $ac_aux_dir is relative |
|---|
| | 136 | # $top_srcdir/$ac_aux_dir/missing |
|---|
| | 137 | # fails if $ac_aux_dir is absolute, |
|---|
| | 138 | # fails when called from a subdirectory in a VPATH build with |
|---|
| | 139 | # a relative $ac_aux_dir |
|---|
| | 140 | # |
|---|
| | 141 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
|---|
| | 142 | # are both prefixed by $srcdir. In an in-source build this is usually |
|---|
| | 143 | # harmless because $srcdir is `.', but things will broke when you |
|---|
| | 144 | # start a VPATH build or use an absolute $srcdir. |
|---|
| | 145 | # |
|---|
| | 146 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
|---|
| | 147 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
|---|
| | 148 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
|---|
| | 149 | # and then we would define $MISSING as |
|---|
| | 150 | # MISSING="\${SHELL} $am_aux_dir/missing" |
|---|
| | 151 | # This will work as long as MISSING is not called from configure, because |
|---|
| | 152 | # unfortunately $(top_srcdir) has no meaning in configure. |
|---|
| | 153 | # However there are other variables, like CC, which are often used in |
|---|
| | 154 | # configure, and could therefore not use this "fixed" $ac_aux_dir. |
|---|
| | 155 | # |
|---|
| | 156 | # Another solution, used here, is to always expand $ac_aux_dir to an |
|---|
| | 157 | # absolute PATH. The drawback is that using absolute paths prevent a |
|---|
| | 158 | # configured tree to be moved without reconfiguration. |
|---|
| | 159 | |
|---|
| | 160 | AC_DEFUN([AM_AUX_DIR_EXPAND], |
|---|
| | 161 | [dnl Rely on autoconf to set up CDPATH properly. |
|---|
| | 162 | AC_PREREQ([2.50])dnl |
|---|
| | 163 | # expand $ac_aux_dir to an absolute path |
|---|
| | 164 | am_aux_dir=`cd $ac_aux_dir && pwd` |
|---|
| | 165 | ]) |
|---|
| | 166 | |
|---|
| | 167 | # AM_CONDITIONAL -*- Autoconf -*- |
|---|
| | 168 | |
|---|
| | 169 | # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. |
|---|
| | 170 | |
|---|
| | 171 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 172 | # it under the terms of the GNU General Public License as published by |
|---|
| | 173 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 174 | # any later version. |
|---|
| | 175 | |
|---|
| | 176 | # This program is distributed in the hope that it will be useful, |
|---|
| | 177 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 178 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 179 | # GNU General Public License for more details. |
|---|
| | 180 | |
|---|
| | 181 | # You should have received a copy of the GNU General Public License |
|---|
| | 182 | # along with this program; if not, write to the Free Software |
|---|
| | 183 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 184 | # 02111-1307, USA. |
|---|
| | 185 | |
|---|
| | 186 | # serial 6 |
|---|
| | 187 | |
|---|
| | 188 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
|---|
| | 189 | # ------------------------------------- |
|---|
| | 190 | # Define a conditional. |
|---|
| | 191 | AC_DEFUN([AM_CONDITIONAL], |
|---|
| | 192 | [AC_PREREQ(2.52)dnl |
|---|
| | 193 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
|---|
| | 194 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
|---|
| | 195 | AC_SUBST([$1_TRUE]) |
|---|
| | 196 | AC_SUBST([$1_FALSE]) |
|---|
| | 197 | if $2; then |
|---|
| | 198 | $1_TRUE= |
|---|
| | 199 | $1_FALSE='#' |
|---|
| | 200 | else |
|---|
| | 201 | $1_TRUE='#' |
|---|
| | 202 | $1_FALSE= |
|---|
| | 203 | fi |
|---|
| | 204 | AC_CONFIG_COMMANDS_PRE( |
|---|
| | 205 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
|---|
| | 206 | AC_MSG_ERROR([conditional "$1" was never defined. |
|---|
| | 207 | Usually this means the macro was only invoked conditionally.]) |
|---|
| | 208 | fi])]) |
|---|
| | 209 | |
|---|
| | 210 | # serial 7 -*- Autoconf -*- |
|---|
| | 211 | |
|---|
| | 212 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 |
|---|
| | 213 | # Free Software Foundation, Inc. |
|---|
| | 214 | |
|---|
| | 215 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 216 | # it under the terms of the GNU General Public License as published by |
|---|
| | 217 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 218 | # any later version. |
|---|
| | 219 | |
|---|
| | 220 | # This program is distributed in the hope that it will be useful, |
|---|
| | 221 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 222 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 223 | # GNU General Public License for more details. |
|---|
| | 224 | |
|---|
| | 225 | # You should have received a copy of the GNU General Public License |
|---|
| | 226 | # along with this program; if not, write to the Free Software |
|---|
| | 227 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 228 | # 02111-1307, USA. |
|---|
| | 229 | |
|---|
| | 230 | |
|---|
| | 231 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
|---|
| | 232 | # written in clear, in which case automake, when reading aclocal.m4, |
|---|
| | 233 | # will think it sees a *use*, and therefore will trigger all it's |
|---|
| | 234 | # C support machinery. Also note that it means that autoscan, seeing |
|---|
| | 235 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
|---|
| | 236 | |
|---|
| | 237 | |
|---|
| | 238 | |
|---|
| | 239 | # _AM_DEPENDENCIES(NAME) |
|---|
| | 240 | # ---------------------- |
|---|
| | 241 | # See how the compiler implements dependency checking. |
|---|
| | 242 | # NAME is "CC", "CXX", "GCJ", or "OBJC". |
|---|
| | 243 | # We try a few techniques and use that to set a single cache variable. |
|---|
| | 244 | # |
|---|
| | 245 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
|---|
| | 246 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
|---|
| | 247 | # dependency, and given that the user is not expected to run this macro, |
|---|
| | 248 | # just rely on AC_PROG_CC. |
|---|
| | 249 | AC_DEFUN([_AM_DEPENDENCIES], |
|---|
| | 250 | [AC_REQUIRE([AM_SET_DEPDIR])dnl |
|---|
| | 251 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
|---|
| | 252 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
|---|
| | 253 | AC_REQUIRE([AM_DEP_TRACK])dnl |
|---|
| | 254 | |
|---|
| | 255 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
|---|
| | 256 | [$1], CXX, [depcc="$CXX" am_compiler_list=], |
|---|
| | 257 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
|---|
| | 258 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
|---|
| | 259 | [depcc="$$1" am_compiler_list=]) |
|---|
| | 260 | |
|---|
| | 261 | AC_CACHE_CHECK([dependency style of $depcc], |
|---|
| | 262 | [am_cv_$1_dependencies_compiler_type], |
|---|
| | 263 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
|---|
| | 264 | # We make a subdir and do the tests there. Otherwise we can end up |
|---|
| | 265 | # making bogus files that we don't know about and never remove. For |
|---|
| | 266 | # instance it was reported that on HP-UX the gcc test will end up |
|---|
| | 267 | # making a dummy file named `D' -- because `-MD' means `put the output |
|---|
| | 268 | # in D'. |
|---|
| | 269 | mkdir conftest.dir |
|---|
| | 270 | # Copy depcomp to subdir because otherwise we won't find it if we're |
|---|
| | 271 | # using a relative directory. |
|---|
| | 272 | cp "$am_depcomp" conftest.dir |
|---|
| | 273 | cd conftest.dir |
|---|
| | 274 | # We will build objects and dependencies in a subdirectory because |
|---|
| | 275 | # it helps to detect inapplicable dependency modes. For instance |
|---|
| | 276 | # both Tru64's cc and ICC support -MD to output dependencies as a |
|---|
| | 277 | # side effect of compilation, but ICC will put the dependencies in |
|---|
| | 278 | # the current directory while Tru64 will put them in the object |
|---|
| | 279 | # directory. |
|---|
| | 280 | mkdir sub |
|---|
| | 281 | |
|---|
| | 282 | am_cv_$1_dependencies_compiler_type=none |
|---|
| | 283 | if test "$am_compiler_list" = ""; then |
|---|
| | 284 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
|---|
| | 285 | fi |
|---|
| | 286 | for depmode in $am_compiler_list; do |
|---|
| | 287 | # Setup a source with many dependencies, because some compilers |
|---|
| | 288 | # like to wrap large dependency lists on column 80 (with \), and |
|---|
| | 289 | # we should not choose a depcomp mode which is confused by this. |
|---|
| | 290 | # |
|---|
| | 291 | # We need to recreate these files for each test, as the compiler may |
|---|
| | 292 | # overwrite some of them when testing with obscure command lines. |
|---|
| | 293 | # This happens at least with the AIX C compiler. |
|---|
| | 294 | : > sub/conftest.c |
|---|
| | 295 | for i in 1 2 3 4 5 6; do |
|---|
| | 296 | echo '#include "conftst'$i'.h"' >> sub/conftest.c |
|---|
| | 297 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with |
|---|
| | 298 | # Solaris 8's {/usr,}/bin/sh. |
|---|
| | 299 | touch sub/conftst$i.h |
|---|
| | 300 | done |
|---|
| | 301 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
|---|
| | 302 | |
|---|
| | 303 | case $depmode in |
|---|
| | 304 | nosideeffect) |
|---|
| | 305 | # after this tag, mechanisms are not by side-effect, so they'll |
|---|
| | 306 | # only be used when explicitly requested |
|---|
| | 307 | if test "x$enable_dependency_tracking" = xyes; then |
|---|
| | 308 | continue |
|---|
| | 309 | else |
|---|
| | 310 | break |
|---|
| | 311 | fi |
|---|
| | 312 | ;; |
|---|
| | 313 | none) break ;; |
|---|
| | 314 | esac |
|---|
| | 315 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
|---|
| | 316 | # mode. It turns out that the SunPro C++ compiler does not properly |
|---|
| | 317 | # handle `-M -o', and we need to detect this. |
|---|
| | 318 | if depmode=$depmode \ |
|---|
| | 319 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ |
|---|
| | 320 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
|---|
| | 321 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ |
|---|
| | 322 | >/dev/null 2>conftest.err && |
|---|
| | 323 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
|---|
| | 324 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && |
|---|
| | 325 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
|---|
| | 326 | # icc doesn't choke on unknown options, it will just issue warnings |
|---|
| | 327 | # or remarks (even with -Werror). So we grep stderr for any message |
|---|
| | 328 | # that says an option was ignored or not supported. |
|---|
| | 329 | # When given -MP, icc 7.0 and 7.1 complain thusly: |
|---|
| | 330 | # icc: Command line warning: ignoring option '-M'; no argument required |
|---|
| | 331 | # The diagnosis changed in icc 8.0: |
|---|
| | 332 | # icc: Command line remark: option '-MP' not supported |
|---|
| | 333 | if (grep 'ignoring option' conftest.err || |
|---|
| | 334 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
|---|
| | 335 | am_cv_$1_dependencies_compiler_type=$depmode |
|---|
| | 336 | break |
|---|
| | 337 | fi |
|---|
| | 338 | fi |
|---|
| | 339 | done |
|---|
| | 340 | |
|---|
| | 341 | cd .. |
|---|
| | 342 | rm -rf conftest.dir |
|---|
| | 343 | else |
|---|
| | 344 | am_cv_$1_dependencies_compiler_type=none |
|---|
| | 345 | fi |
|---|
| | 346 | ]) |
|---|
| | 347 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
|---|
| | 348 | AM_CONDITIONAL([am__fastdep$1], [ |
|---|
| | 349 | test "x$enable_dependency_tracking" != xno \ |
|---|
| | 350 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
|---|
| | 351 | ]) |
|---|
| | 352 | |
|---|
| | 353 | |
|---|
| | 354 | # AM_SET_DEPDIR |
|---|
| | 355 | # ------------- |
|---|
| | 356 | # Choose a directory name for dependency files. |
|---|
| | 357 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES |
|---|
| | 358 | AC_DEFUN([AM_SET_DEPDIR], |
|---|
| | 359 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
|---|
| | 360 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
|---|
| | 361 | ]) |
|---|
| | 362 | |
|---|
| | 363 | |
|---|
| | 364 | # AM_DEP_TRACK |
|---|
| | 365 | # ------------ |
|---|
| | 366 | AC_DEFUN([AM_DEP_TRACK], |
|---|
| | 367 | [AC_ARG_ENABLE(dependency-tracking, |
|---|
| | 368 | [ --disable-dependency-tracking speeds up one-time build |
|---|
| | 369 | --enable-dependency-tracking do not reject slow dependency extractors]) |
|---|
| | 370 | if test "x$enable_dependency_tracking" != xno; then |
|---|
| | 371 | am_depcomp="$ac_aux_dir/depcomp" |
|---|
| | 372 | AMDEPBACKSLASH='\' |
|---|
| | 373 | fi |
|---|
| | 374 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
|---|
| | 375 | AC_SUBST([AMDEPBACKSLASH]) |
|---|
| | 376 | ]) |
|---|
| | 377 | |
|---|
| | 378 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
|---|
| | 379 | |
|---|
| | 380 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
|---|
| | 381 | |
|---|
| | 382 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 383 | # it under the terms of the GNU General Public License as published by |
|---|
| | 384 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 385 | # any later version. |
|---|
| | 386 | |
|---|
| | 387 | # This program is distributed in the hope that it will be useful, |
|---|
| | 388 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 389 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 390 | # GNU General Public License for more details. |
|---|
| | 391 | |
|---|
| | 392 | # You should have received a copy of the GNU General Public License |
|---|
| | 393 | # along with this program; if not, write to the Free Software |
|---|
| | 394 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 395 | # 02111-1307, USA. |
|---|
| | 396 | |
|---|
| | 397 | #serial 2 |
|---|
| | 398 | |
|---|
| | 399 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
|---|
| | 400 | # ------------------------------ |
|---|
| | 401 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
|---|
| | 402 | [for mf in $CONFIG_FILES; do |
|---|
| | 403 | # Strip MF so we end up with the name of the file. |
|---|
| | 404 | mf=`echo "$mf" | sed -e 's/:.*$//'` |
|---|
| | 405 | # Check whether this is an Automake generated Makefile or not. |
|---|
| | 406 | # We used to match only the files named `Makefile.in', but |
|---|
| | 407 | # some people rename them; so instead we look at the file content. |
|---|
| | 408 | # Grep'ing the first line is not enough: some people post-process |
|---|
| | 409 | # each Makefile.in and add a new line on top of each file to say so. |
|---|
| | 410 | # So let's grep whole file. |
|---|
| | 411 | if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then |
|---|
| | 412 | dirpart=`AS_DIRNAME("$mf")` |
|---|
| | 413 | else |
|---|
| | 414 | continue |
|---|
| | 415 | fi |
|---|
| | 416 | grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue |
|---|
| | 417 | # Extract the definition of DEP_FILES from the Makefile without |
|---|
| | 418 | # running `make'. |
|---|
| | 419 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
|---|
| | 420 | test -z "$DEPDIR" && continue |
|---|
| | 421 | # When using ansi2knr, U may be empty or an underscore; expand it |
|---|
| | 422 | U=`sed -n 's/^U = //p' < "$mf"` |
|---|
| | 423 | test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" |
|---|
| | 424 | # We invoke sed twice because it is the simplest approach to |
|---|
| | 425 | # changing $(DEPDIR) to its actual value in the expansion. |
|---|
| | 426 | for file in `sed -n ' |
|---|
| | 427 | /^DEP_FILES = .*\\\\$/ { |
|---|
| | 428 | s/^DEP_FILES = // |
|---|
| | 429 | :loop |
|---|
| | 430 | s/\\\\$// |
|---|
| | 431 | p |
|---|
| | 432 | n |
|---|
| | 433 | /\\\\$/ b loop |
|---|
| | 434 | p |
|---|
| | 435 | } |
|---|
| | 436 | /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ |
|---|
| | 437 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
|---|
| | 438 | # Make sure the directory exists. |
|---|
| | 439 | test -f "$dirpart/$file" && continue |
|---|
| | 440 | fdir=`AS_DIRNAME(["$file"])` |
|---|
| | 441 | AS_MKDIR_P([$dirpart/$fdir]) |
|---|
| | 442 | # echo "creating $dirpart/$file" |
|---|
| | 443 | echo '# dummy' > "$dirpart/$file" |
|---|
| | 444 | done |
|---|
| | 445 | done |
|---|
| | 446 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
|---|
| | 447 | |
|---|
| | 448 | |
|---|
| | 449 | # AM_OUTPUT_DEPENDENCY_COMMANDS |
|---|
| | 450 | # ----------------------------- |
|---|
| | 451 | # This macro should only be invoked once -- use via AC_REQUIRE. |
|---|
| | 452 | # |
|---|
| | 453 | # This code is only required when automatic dependency tracking |
|---|
| | 454 | # is enabled. FIXME. This creates each `.P' file that we will |
|---|
| | 455 | # need in order to bootstrap the dependency handling code. |
|---|
| | 456 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
|---|
| | 457 | [AC_CONFIG_COMMANDS([depfiles], |
|---|
| | 458 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
|---|
| | 459 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
|---|
| | 460 | ]) |
|---|
| | 461 | |
|---|
| | 462 | # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- |
|---|
| | 463 | |
|---|
| | 464 | # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. |
|---|
| | 465 | |
|---|
| | 466 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 467 | # it under the terms of the GNU General Public License as published by |
|---|
| | 468 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 469 | # any later version. |
|---|
| | 470 | |
|---|
| | 471 | # This program is distributed in the hope that it will be useful, |
|---|
| | 472 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 473 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 474 | # GNU General Public License for more details. |
|---|
| | 475 | |
|---|
| | 476 | # You should have received a copy of the GNU General Public License |
|---|
| | 477 | # along with this program; if not, write to the Free Software |
|---|
| | 478 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 479 | # 02111-1307, USA. |
|---|
| | 480 | |
|---|
| | 481 | # serial 7 |
|---|
| | 482 | |
|---|
| | 483 | # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. |
|---|
| | 484 | AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) |
|---|
| | 485 | |
|---|
| | 486 | # Do all the work for Automake. -*- Autoconf -*- |
|---|
| | 487 | |
|---|
| | 488 | # This macro actually does too much some checks are only needed if |
|---|
| | 489 | # your package does certain things. But this isn't really a big deal. |
|---|
| | 490 | |
|---|
| | 491 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 |
|---|
| | 492 | # Free Software Foundation, Inc. |
|---|
| | 493 | |
|---|
| | 494 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 495 | # it under the terms of the GNU General Public License as published by |
|---|
| | 496 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 497 | # any later version. |
|---|
| | 498 | |
|---|
| | 499 | # This program is distributed in the hope that it will be useful, |
|---|
| | 500 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 501 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 502 | # GNU General Public License for more details. |
|---|
| | 503 | |
|---|
| | 504 | # You should have received a copy of the GNU General Public License |
|---|
| | 505 | # along with this program; if not, write to the Free Software |
|---|
| | 506 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 507 | # 02111-1307, USA. |
|---|
| | 508 | |
|---|
| | 509 | # serial 11 |
|---|
| | 510 | |
|---|
| | 511 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
|---|
| | 512 | # AM_INIT_AUTOMAKE([OPTIONS]) |
|---|
| | 513 | # ----------------------------------------------- |
|---|
| | 514 | # The call with PACKAGE and VERSION arguments is the old style |
|---|
| | 515 | # call (pre autoconf-2.50), which is being phased out. PACKAGE |
|---|
| | 516 | # and VERSION should now be passed to AC_INIT and removed from |
|---|
| | 517 | # the call to AM_INIT_AUTOMAKE. |
|---|
| | 518 | # We support both call styles for the transition. After |
|---|
| | 519 | # the next Automake release, Autoconf can make the AC_INIT |
|---|
| | 520 | # arguments mandatory, and then we can depend on a new Autoconf |
|---|
| | 521 | # release and drop the old call support. |
|---|
| | 522 | AC_DEFUN([AM_INIT_AUTOMAKE], |
|---|
| | 523 | [AC_PREREQ([2.58])dnl |
|---|
| | 524 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
|---|
| | 525 | dnl the ones we care about. |
|---|
| | 526 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
|---|
| | 527 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
|---|
| | 528 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
|---|
| | 529 | # test to see if srcdir already configured |
|---|
| | 530 | if test "`cd $srcdir && pwd`" != "`pwd`" && |
|---|
| | 531 | test -f $srcdir/config.status; then |
|---|
| | 532 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
|---|
| | 533 | fi |
|---|
| | 534 | |
|---|
| | 535 | # test whether we have cygpath |
|---|
| | 536 | if test -z "$CYGPATH_W"; then |
|---|
| | 537 | if (cygpath --version) >/dev/null 2>/dev/null; then |
|---|
| | 538 | CYGPATH_W='cygpath -w' |
|---|
| | 539 | else |
|---|
| | 540 | CYGPATH_W=echo |
|---|
| | 541 | fi |
|---|
| | 542 | fi |
|---|
| | 543 | AC_SUBST([CYGPATH_W]) |
|---|
| | 544 | |
|---|
| | 545 | # Define the identity of the package. |
|---|
| | 546 | dnl Distinguish between old-style and new-style calls. |
|---|
| | 547 | m4_ifval([$2], |
|---|
| | 548 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
|---|
| | 549 | AC_SUBST([PACKAGE], [$1])dnl |
|---|
| | 550 | AC_SUBST([VERSION], [$2])], |
|---|
| | 551 | [_AM_SET_OPTIONS([$1])dnl |
|---|
| | 552 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
|---|
| | 553 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
|---|
| | 554 | |
|---|
| | 555 | _AM_IF_OPTION([no-define],, |
|---|
| | 556 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
|---|
| | 557 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
|---|
| | 558 | |
|---|
| | 559 | # Some tools Automake needs. |
|---|
| | 560 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
|---|
| | 561 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
|---|
| | 562 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
|---|
| | 563 | AM_MISSING_PROG(AUTOCONF, autoconf) |
|---|
| | 564 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
|---|
| | 565 | AM_MISSING_PROG(AUTOHEADER, autoheader) |
|---|
| | 566 | AM_MISSING_PROG(MAKEINFO, makeinfo) |
|---|
| | 567 | AM_MISSING_PROG(AMTAR, tar) |
|---|
| | 568 | AM_PROG_INSTALL_SH |
|---|
| | 569 | AM_PROG_INSTALL_STRIP |
|---|
| | 570 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl |
|---|
| | 571 | # We need awk for the "check" target. The system "awk" is bad on |
|---|
| | 572 | # some platforms. |
|---|
| | 573 | AC_REQUIRE([AC_PROG_AWK])dnl |
|---|
| | 574 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
|---|
| | 575 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
|---|
| | 576 | |
|---|
| | 577 | _AM_IF_OPTION([no-dependencies],, |
|---|
| | 578 | [AC_PROVIDE_IFELSE([AC_PROG_CC], |
|---|
| | 579 | [_AM_DEPENDENCIES(CC)], |
|---|
| | 580 | [define([AC_PROG_CC], |
|---|
| | 581 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl |
|---|
| | 582 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
|---|
| | 583 | [_AM_DEPENDENCIES(CXX)], |
|---|
| | 584 | [define([AC_PROG_CXX], |
|---|
| | 585 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
|---|
| | 586 | ]) |
|---|
| | 587 | ]) |
|---|
| | 588 | |
|---|
| | 589 | |
|---|
| | 590 | # When config.status generates a header, we must update the stamp-h file. |
|---|
| | 591 | # This file resides in the same directory as the config header |
|---|
| | 592 | # that is generated. The stamp files are numbered to have different names. |
|---|
| | 593 | |
|---|
| | 594 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
|---|
| | 595 | # loop where config.status creates the headers, so we can generate |
|---|
| | 596 | # our stamp files there. |
|---|
| | 597 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
|---|
| | 598 | [# Compute $1's index in $config_headers. |
|---|
| | 599 | _am_stamp_count=1 |
|---|
| | 600 | for _am_header in $config_headers :; do |
|---|
| | 601 | case $_am_header in |
|---|
| | 602 | $1 | $1:* ) |
|---|
| | 603 | break ;; |
|---|
| | 604 | * ) |
|---|
| | 605 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; |
|---|
| | 606 | esac |
|---|
| | 607 | done |
|---|
| | 608 | echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) |
|---|
| | 609 | |
|---|
| | 610 | # AM_PROG_INSTALL_SH |
|---|
| | 611 | # ------------------ |
|---|
| | 612 | # Define $install_sh. |
|---|
| | 613 | |
|---|
| | 614 | # Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
|---|
| | 615 | |
|---|
| | 616 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 617 | # it under the terms of the GNU General Public License as published by |
|---|
| | 618 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 619 | # any later version. |
|---|
| | 620 | |
|---|
| | 621 | # This program is distributed in the hope that it will be useful, |
|---|
| | 622 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 623 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 624 | # GNU General Public License for more details. |
|---|
| | 625 | |
|---|
| | 626 | # You should have received a copy of the GNU General Public License |
|---|
| | 627 | # along with this program; if not, write to the Free Software |
|---|
| | 628 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 629 | # 02111-1307, USA. |
|---|
| | 630 | |
|---|
| | 631 | AC_DEFUN([AM_PROG_INSTALL_SH], |
|---|
| | 632 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
|---|
| | 633 | install_sh=${install_sh-"$am_aux_dir/install-sh"} |
|---|
| | 634 | AC_SUBST(install_sh)]) |
|---|
| | 635 | |
|---|
| | 636 | # -*- Autoconf -*- |
|---|
| | 637 | # Copyright (C) 2003 Free Software Foundation, Inc. |
|---|
| | 638 | |
|---|
| | 639 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 640 | # it under the terms of the GNU General Public License as published by |
|---|
| | 641 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 642 | # any later version. |
|---|
| | 643 | |
|---|
| | 644 | # This program is distributed in the hope that it will be useful, |
|---|
| | 645 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 646 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 647 | # GNU General Public License for more details. |
|---|
| | 648 | |
|---|
| | 649 | # You should have received a copy of the GNU General Public License |
|---|
| | 650 | # along with this program; if not, write to the Free Software |
|---|
| | 651 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 652 | # 02111-1307, USA. |
|---|
| | 653 | |
|---|
| | 654 | # serial 1 |
|---|
| | 655 | |
|---|
| | 656 | # Check whether the underlying file-system supports filenames |
|---|
| | 657 | # with a leading dot. For instance MS-DOS doesn't. |
|---|
| | 658 | AC_DEFUN([AM_SET_LEADING_DOT], |
|---|
| | 659 | [rm -rf .tst 2>/dev/null |
|---|
| | 660 | mkdir .tst 2>/dev/null |
|---|
| | 661 | if test -d .tst; then |
|---|
| | 662 | am__leading_dot=. |
|---|
| | 663 | else |
|---|
| | 664 | am__leading_dot=_ |
|---|
| | 665 | fi |
|---|
| | 666 | rmdir .tst 2>/dev/null |
|---|
| | 667 | AC_SUBST([am__leading_dot])]) |
|---|
| | 668 | |
|---|
| | 669 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
|---|
| | 670 | |
|---|
| | 671 | # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
|---|
| | 672 | |
|---|
| | 673 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 674 | # it under the terms of the GNU General Public License as published by |
|---|
| | 675 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 676 | # any later version. |
|---|
| | 677 | |
|---|
| | 678 | # This program is distributed in the hope that it will be useful, |
|---|
| | 679 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 680 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 681 | # GNU General Public License for more details. |
|---|
| | 682 | |
|---|
| | 683 | # You should have received a copy of the GNU General Public License |
|---|
| | 684 | # along with this program; if not, write to the Free Software |
|---|
| | 685 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 686 | # 02111-1307, USA. |
|---|
| | 687 | |
|---|
| | 688 | # serial 2 |
|---|
| | 689 | |
|---|
| | 690 | # AM_MAKE_INCLUDE() |
|---|
| | 691 | # ----------------- |
|---|
| | 692 | # Check to see how make treats includes. |
|---|
| | 693 | AC_DEFUN([AM_MAKE_INCLUDE], |
|---|
| | 694 | [am_make=${MAKE-make} |
|---|
| | 695 | cat > confinc << 'END' |
|---|
| | 696 | am__doit: |
|---|
| | 697 | @echo done |
|---|
| | 698 | .PHONY: am__doit |
|---|
| | 699 | END |
|---|
| | 700 | # If we don't find an include directive, just comment out the code. |
|---|
| | 701 | AC_MSG_CHECKING([for style of include used by $am_make]) |
|---|
| | 702 | am__include="#" |
|---|
| | 703 | am__quote= |
|---|
| | 704 | _am_result=none |
|---|
| | 705 | # First try GNU make style include. |
|---|
| | 706 | echo "include confinc" > confmf |
|---|
| | 707 | # We grep out `Entering directory' and `Leaving directory' |
|---|
| | 708 | # messages which can occur if `w' ends up in MAKEFLAGS. |
|---|
| | 709 | # In particular we don't look at `^make:' because GNU make might |
|---|
| | 710 | # be invoked under some other name (usually "gmake"), in which |
|---|
| | 711 | # case it prints its new name instead of `make'. |
|---|
| | 712 | if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then |
|---|
| | 713 | am__include=include |
|---|
| | 714 | am__quote= |
|---|
| | 715 | _am_result=GNU |
|---|
| | 716 | fi |
|---|
| | 717 | # Now try BSD make style include. |
|---|
| | 718 | if test "$am__include" = "#"; then |
|---|
| | 719 | echo '.include "confinc"' > confmf |
|---|
| | 720 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then |
|---|
| | 721 | am__include=.include |
|---|
| | 722 | am__quote="\"" |
|---|
| | 723 | _am_result=BSD |
|---|
| | 724 | fi |
|---|
| | 725 | fi |
|---|
| | 726 | AC_SUBST([am__include]) |
|---|
| | 727 | AC_SUBST([am__quote]) |
|---|
| | 728 | AC_MSG_RESULT([$_am_result]) |
|---|
| | 729 | rm -f confinc confmf |
|---|
| | 730 | ]) |
|---|
| | 731 | |
|---|
| | 732 | # -*- Autoconf -*- |
|---|
| | 733 | |
|---|
| | 734 | |
|---|
| | 735 | # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. |
|---|
| | 736 | |
|---|
| | 737 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 738 | # it under the terms of the GNU General Public License as published by |
|---|
| | 739 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 740 | # any later version. |
|---|
| | 741 | |
|---|
| | 742 | # This program is distributed in the hope that it will be useful, |
|---|
| | 743 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 744 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 745 | # GNU General Public License for more details. |
|---|
| | 746 | |
|---|
| | 747 | # You should have received a copy of the GNU General Public License |
|---|
| | 748 | # along with this program; if not, write to the Free Software |
|---|
| | 749 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 750 | # 02111-1307, USA. |
|---|
| | 751 | |
|---|
| | 752 | # serial 3 |
|---|
| | 753 | |
|---|
| | 754 | # AM_MISSING_PROG(NAME, PROGRAM) |
|---|
| | 755 | # ------------------------------ |
|---|
| | 756 | AC_DEFUN([AM_MISSING_PROG], |
|---|
| | 757 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) |
|---|
| | 758 | $1=${$1-"${am_missing_run}$2"} |
|---|
| | 759 | AC_SUBST($1)]) |
|---|
| | 760 | |
|---|
| | 761 | |
|---|
| | 762 | # AM_MISSING_HAS_RUN |
|---|
| | 763 | # ------------------ |
|---|
| | 764 | # Define MISSING if not defined so far and test if it supports --run. |
|---|
| | 765 | # If it does, set am_missing_run to use it, otherwise, to nothing. |
|---|
| | 766 | AC_DEFUN([AM_MISSING_HAS_RUN], |
|---|
| | 767 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
|---|
| | 768 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" |
|---|
| | 769 | # Use eval to expand $SHELL |
|---|
| | 770 | if eval "$MISSING --run true"; then |
|---|
| | 771 | am_missing_run="$MISSING --run " |
|---|
| | 772 | else |
|---|
| | 773 | am_missing_run= |
|---|
| | 774 | AC_MSG_WARN([`missing' script is too old or missing]) |
|---|
| | 775 | fi |
|---|
| | 776 | ]) |
|---|
| | 777 | |
|---|
| | 778 | # AM_PROG_MKDIR_P |
|---|
| | 779 | # --------------- |
|---|
| | 780 | # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. |
|---|
| | 781 | |
|---|
| | 782 | # Copyright (C) 2003, 2004 Free Software Foundation, Inc. |
|---|
| | 783 | |
|---|
| | 784 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 785 | # it under the terms of the GNU General Public License as published by |
|---|
| | 786 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 787 | # any later version. |
|---|
| | 788 | |
|---|
| | 789 | # This program is distributed in the hope that it will be useful, |
|---|
| | 790 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 791 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 792 | # GNU General Public License for more details. |
|---|
| | 793 | |
|---|
| | 794 | # You should have received a copy of the GNU General Public License |
|---|
| | 795 | # along with this program; if not, write to the Free Software |
|---|
| | 796 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 797 | # 02111-1307, USA. |
|---|
| | 798 | |
|---|
| | 799 | # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories |
|---|
| | 800 | # created by `make install' are always world readable, even if the |
|---|
| | 801 | # installer happens to have an overly restrictive umask (e.g. 077). |
|---|
| | 802 | # This was a mistake. There are at least two reasons why we must not |
|---|
| | 803 | # use `-m 0755': |
|---|
| | 804 | # - it causes special bits like SGID to be ignored, |
|---|
| | 805 | # - it may be too restrictive (some setups expect 775 directories). |
|---|
| | 806 | # |
|---|
| | 807 | # Do not use -m 0755 and let people choose whatever they expect by |
|---|
| | 808 | # setting umask. |
|---|
| | 809 | # |
|---|
| | 810 | # We cannot accept any implementation of `mkdir' that recognizes `-p'. |
|---|
| | 811 | # Some implementations (such as Solaris 8's) are not thread-safe: if a |
|---|
| | 812 | # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' |
|---|
| | 813 | # concurrently, both version can detect that a/ is missing, but only |
|---|
| | 814 | # one can create it and the other will error out. Consequently we |
|---|
| | 815 | # restrict ourselves to GNU make (using the --version option ensures |
|---|
| | 816 | # this.) |
|---|
| | 817 | AC_DEFUN([AM_PROG_MKDIR_P], |
|---|
| | 818 | [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then |
|---|
| | 819 | # Keeping the `.' argument allows $(mkdir_p) to be used without |
|---|
| | 820 | # argument. Indeed, we sometimes output rules like |
|---|
| | 821 | # $(mkdir_p) $(somedir) |
|---|
| | 822 | # where $(somedir) is conditionally defined. |
|---|
| | 823 | # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more |
|---|
| | 824 | # expensive solution, as it forces Make to start a sub-shell.) |
|---|
| | 825 | mkdir_p='mkdir -p -- .' |
|---|
| | 826 | else |
|---|
| | 827 | # On NextStep and OpenStep, the `mkdir' command does not |
|---|
| | 828 | # recognize any option. It will interpret all options as |
|---|
| | 829 | # directories to create, and then abort because `.' already |
|---|
| | 830 | # exists. |
|---|
| | 831 | for d in ./-p ./--version; |
|---|
| | 832 | do |
|---|
| | 833 | test -d $d && rmdir $d |
|---|
| | 834 | done |
|---|
| | 835 | # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. |
|---|
| | 836 | if test -f "$ac_aux_dir/mkinstalldirs"; then |
|---|
| | 837 | mkdir_p='$(mkinstalldirs)' |
|---|
| | 838 | else |
|---|
| | 839 | mkdir_p='$(install_sh) -d' |
|---|
| | 840 | fi |
|---|
| | 841 | fi |
|---|
| | 842 | AC_SUBST([mkdir_p])]) |
|---|
| | 843 | |
|---|
| | 844 | # Helper functions for option handling. -*- Autoconf -*- |
|---|
| | 845 | |
|---|
| | 846 | # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
|---|
| | 847 | |
|---|
| | 848 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 849 | # it under the terms of the GNU General Public License as published by |
|---|
| | 850 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 851 | # any later version. |
|---|
| | 852 | |
|---|
| | 853 | # This program is distributed in the hope that it will be useful, |
|---|
| | 854 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 855 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 856 | # GNU General Public License for more details. |
|---|
| | 857 | |
|---|
| | 858 | # You should have received a copy of the GNU General Public License |
|---|
| | 859 | # along with this program; if not, write to the Free Software |
|---|
| | 860 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 861 | # 02111-1307, USA. |
|---|
| | 862 | |
|---|
| | 863 | # serial 2 |
|---|
| | 864 | |
|---|
| | 865 | # _AM_MANGLE_OPTION(NAME) |
|---|
| | 866 | # ----------------------- |
|---|
| | 867 | AC_DEFUN([_AM_MANGLE_OPTION], |
|---|
| | 868 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
|---|
| | 869 | |
|---|
| | 870 | # _AM_SET_OPTION(NAME) |
|---|
| | 871 | # ------------------------------ |
|---|
| | 872 | # Set option NAME. Presently that only means defining a flag for this option. |
|---|
| | 873 | AC_DEFUN([_AM_SET_OPTION], |
|---|
| | 874 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
|---|
| | 875 | |
|---|
| | 876 | # _AM_SET_OPTIONS(OPTIONS) |
|---|
| | 877 | # ---------------------------------- |
|---|
| | 878 | # OPTIONS is a space-separated list of Automake options. |
|---|
| | 879 | AC_DEFUN([_AM_SET_OPTIONS], |
|---|
| | 880 | [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
|---|
| | 881 | |
|---|
| | 882 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
|---|
| | 883 | # ------------------------------------------- |
|---|
| | 884 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
|---|
| | 885 | AC_DEFUN([_AM_IF_OPTION], |
|---|
| | 886 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
|---|
| | 887 | |
|---|
| | 888 | # |
|---|
| | 889 | # Check to make sure that the build environment is sane. |
|---|
| | 890 | # |
|---|
| | 891 | |
|---|
| | 892 | # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. |
|---|
| | 893 | |
|---|
| | 894 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 895 | # it under the terms of the GNU General Public License as published by |
|---|
| | 896 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 897 | # any later version. |
|---|
| | 898 | |
|---|
| | 899 | # This program is distributed in the hope that it will be useful, |
|---|
| | 900 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 901 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 902 | # GNU General Public License for more details. |
|---|
| | 903 | |
|---|
| | 904 | # You should have received a copy of the GNU General Public License |
|---|
| | 905 | # along with this program; if not, write to the Free Software |
|---|
| | 906 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 907 | # 02111-1307, USA. |
|---|
| | 908 | |
|---|
| | 909 | # serial 3 |
|---|
| | 910 | |
|---|
| | 911 | # AM_SANITY_CHECK |
|---|
| | 912 | # --------------- |
|---|
| | 913 | AC_DEFUN([AM_SANITY_CHECK], |
|---|
| | 914 | [AC_MSG_CHECKING([whether build environment is sane]) |
|---|
| | 915 | # Just in case |
|---|
| | 916 | sleep 1 |
|---|
| | 917 | echo timestamp > conftest.file |
|---|
| | 918 | # Do `set' in a subshell so we don't clobber the current shell's |
|---|
| | 919 | # arguments. Must try -L first in case configure is actually a |
|---|
| | 920 | # symlink; some systems play weird games with the mod time of symlinks |
|---|
| | 921 | # (eg FreeBSD returns the mod time of the symlink's containing |
|---|
| | 922 | # directory). |
|---|
| | 923 | if ( |
|---|
| | 924 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` |
|---|
| | 925 | if test "$[*]" = "X"; then |
|---|
| | 926 | # -L didn't work. |
|---|
| | 927 | set X `ls -t $srcdir/configure conftest.file` |
|---|
| | 928 | fi |
|---|
| | 929 | rm -f conftest.file |
|---|
| | 930 | if test "$[*]" != "X $srcdir/configure conftest.file" \ |
|---|
| | 931 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
|---|
| | 932 | |
|---|
| | 933 | # If neither matched, then we have a broken ls. This can happen |
|---|
| | 934 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
|---|
| | 935 | # broken ls alias from the environment. This has actually |
|---|
| | 936 | # happened. Such a system could not be considered "sane". |
|---|
| | 937 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
|---|
| | 938 | alias in your environment]) |
|---|
| | 939 | fi |
|---|
| | 940 | |
|---|
| | 941 | test "$[2]" = conftest.file |
|---|
| | 942 | ) |
|---|
| | 943 | then |
|---|
| | 944 | # Ok. |
|---|
| | 945 | : |
|---|
| | 946 | else |
|---|
| | 947 | AC_MSG_ERROR([newly created file is older than distributed files! |
|---|
| | 948 | Check your system clock]) |
|---|
| | 949 | fi |
|---|
| | 950 | AC_MSG_RESULT(yes)]) |
|---|
| | 951 | |
|---|
| | 952 | # AM_PROG_INSTALL_STRIP |
|---|
| | 953 | |
|---|
| | 954 | # Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
|---|
| | 955 | |
|---|
| | 956 | # This program is free software; you can redistribute it and/or modify |
|---|
| | 957 | # it under the terms of the GNU General Public License as published by |
|---|
| | 958 | # the Free Software Foundation; either version 2, or (at your option) |
|---|
| | 959 | # any later version. |
|---|
| | 960 | |
|---|
| | 961 | # This program is distributed in the hope that it will be useful, |
|---|
| | 962 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| | 963 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| | 964 | # GNU General Public License for more details. |
|---|
| | 965 | |
|---|
| | 966 | # You should have received a copy of the GNU General Public License |
|---|
| | 967 | # along with this program; if not, write to the Free Software |
|---|
| | 968 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|---|
| | 969 | # 02111-1307, USA. |
|---|
| | 970 | |
|---|
| | 971 | # One issue with vendor `install' (even GNU) is that you can't |
|---|
| | 972 | # specify the program used to strip binaries. This is especially |
|---|
| | 973 | # annoying in cross-compiling environments, where the build's strip |
|---|
| | 974 | # is unlikely to handle the host's binaries. |
|---|
| | 975 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
|---|
| | 976 | # always use install-sh in `make install-strip', and initialize |
|---|
| | 977 | # STRIPPROG with the value of the STRIP variable (set by the user). |
|---|
| | 978 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
|---|
| | 979 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
|---|
| | 980 | # Installed binaries are usually stripped using `strip' when the user |
|---|
| | 981 | # run `make install-strip'. However `strip' might not be the right |
|---|
| | 982 | # tool to use in cross-compilation environments, therefore Automake |
|---|
| | 983 | # will honor the `STRIP' environment variable to overrule this program. |
|---|
| | 984 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
|---|
| | 985 | if test "$cross_compiling" != no; then |
|---|
| | 986 | AC_CHECK_TOOL([STRIP], [strip], :) |
|---|
| | 987 | fi |
|---|
| | 988 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" |
|---|
| | 989 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
|---|
| | 990 | |
|---|
| | 991 | m4_include([acinclude.m4]) |
|---|