| 1 | # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
 | 
|---|
| 2 | 
 | 
|---|
| 3 | # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
 | 
|---|
| 4 | # Free Software Foundation, Inc.
 | 
|---|
| 5 | # This file is free software; the Free Software Foundation
 | 
|---|
| 6 | # gives unlimited permission to copy and/or distribute it,
 | 
|---|
| 7 | # with or without modifications, as long as this notice is preserved.
 | 
|---|
| 8 | 
 | 
|---|
| 9 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 | 
|---|
| 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 | 
|---|
| 12 | # PARTICULAR PURPOSE.
 | 
|---|
| 13 | 
 | 
|---|
| 14 | dnl synergy -- mouse and keyboard sharing utility
 | 
|---|
| 15 | dnl Copyright (C) 2002 Chris Schoeneman
 | 
|---|
| 16 | dnl 
 | 
|---|
| 17 | dnl This package is free software; you can redistribute it and/or
 | 
|---|
| 18 | dnl modify it under the terms of the GNU General Public License
 | 
|---|
| 19 | dnl found in the file COPYING that should have accompanied this file.
 | 
|---|
| 20 | dnl 
 | 
|---|
| 21 | dnl This package is distributed in the hope that it will be useful,
 | 
|---|
| 22 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 23 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 24 | dnl GNU General Public License for more details.
 | 
|---|
| 25 | 
 | 
|---|
| 26 | AC_DEFUN([ACX_CHECK_SOCKLEN_T], [
 | 
|---|
| 27 |         AC_MSG_CHECKING([for socklen_t])
 | 
|---|
| 28 |         AC_TRY_COMPILE([
 | 
|---|
| 29 |                 #include <unistd.h>
 | 
|---|
| 30 |                 #include <sys/socket.h>
 | 
|---|
| 31 |                 ],
 | 
|---|
| 32 |                 [socklen_t len;],[acx_socklen_t_ok=yes],[acx_socklen_t_ok=no])
 | 
|---|
| 33 |         AC_MSG_RESULT($acx_socklen_t_ok)
 | 
|---|
| 34 |         if test x"$acx_socklen_t_ok" = xyes; then
 | 
|---|
| 35 |                 ifelse([$1],,AC_DEFINE(HAVE_SOCKLEN_T,1,[Define if your compiler defines socklen_t.]),[$1])
 | 
|---|
| 36 |                 :
 | 
|---|
| 37 |         else
 | 
|---|
| 38 |                 acx_socklen_t_ok=no
 | 
|---|
| 39 |                 $2
 | 
|---|
| 40 |         fi
 | 
|---|
| 41 | ])dnl ACX_CHECK_SOCKLEN_T
 | 
|---|
| 42 | 
 | 
|---|
| 43 | AC_DEFUN([ACX_CHECK_CXX], [
 | 
|---|
| 44 |         AC_MSG_CHECKING([if g++ defines correct C++ macro])
 | 
|---|
| 45 |         AC_TRY_COMPILE(, [
 | 
|---|
| 46 |                 #if defined(_LANGUAGE_C) && !defined(_LANGUAGE_C_PLUS_PLUS)
 | 
|---|
| 47 |                 #error wrong macro
 | 
|---|
| 48 |                 #endif],[acx_cxx_macro_ok=yes],[acx_cxx_macro_ok=no])
 | 
|---|
| 49 |         AC_MSG_RESULT($acx_cxx_macro_ok)
 | 
|---|
| 50 |         if test x"$acx_cxx_macro_ok" = xyes; then
 | 
|---|
| 51 |                 SYNERGY_CXXFLAGS=""
 | 
|---|
| 52 |         else
 | 
|---|
| 53 |                 SYNERGY_CXXFLAGS="-U_LANGUAGE_C -D_LANGUAGE_C_PLUS_PLUS"
 | 
|---|
| 54 |         fi
 | 
|---|
| 55 | ])dnl ACX_CHECK_CXX
 | 
|---|
| 56 | 
 | 
|---|
| 57 | AC_DEFUN([ACX_CHECK_CXX_BOOL], [
 | 
|---|
| 58 |         AC_MSG_CHECKING([for bool support])
 | 
|---|
| 59 |         AC_TRY_COMPILE(, [bool t = true, f = false;],
 | 
|---|
| 60 |                 [acx_cxx_bool_ok=yes],[acx_cxx_bool_ok=no])
 | 
|---|
| 61 |         AC_MSG_RESULT($acx_cxx_bool_ok)
 | 
|---|
| 62 |         if test x"$acx_cxx_bool_ok" = xyes; then
 | 
|---|
| 63 |                 ifelse([$1],,AC_DEFINE(HAVE_CXX_BOOL,1,[Define if your compiler has bool support.]),[$1])
 | 
|---|
| 64 |                 :
 | 
|---|
| 65 |         else
 | 
|---|
| 66 |                 acx_cxx_bool_ok=no
 | 
|---|
| 67 |                 $2
 | 
|---|
| 68 |         fi
 | 
|---|
| 69 | ])dnl ACX_CHECK_CXX_BOOL
 | 
|---|
| 70 | 
 | 
|---|
| 71 | AC_DEFUN([ACX_CHECK_CXX_EXCEPTIONS], [
 | 
|---|
| 72 |         AC_MSG_CHECKING([for exception support])
 | 
|---|
| 73 |         AC_TRY_COMPILE(, [try{throw int(4);}catch(int){throw;}catch(...){}],
 | 
|---|
| 74 |                 [acx_cxx_exception_ok=yes],[acx_cxx_exception_ok=no])
 | 
|---|
| 75 |         AC_MSG_RESULT($acx_cxx_exception_ok)
 | 
|---|
| 76 |         if test x"$acx_cxx_exception_ok" = xyes; then
 | 
|---|
| 77 |                 ifelse([$1],,AC_DEFINE(HAVE_CXX_EXCEPTIONS,1,[Define if your compiler has exceptions support.]),[$1])
 | 
|---|
| 78 |                 :
 | 
|---|
| 79 |         else
 | 
|---|
| 80 |                 acx_cxx_exception_ok=no
 | 
|---|
| 81 |                 $2
 | 
|---|
| 82 |         fi
 | 
|---|
| 83 | ])dnl ACX_CHECK_CXX_EXCEPTIONS
 | 
|---|
| 84 | 
 | 
|---|
| 85 | AC_DEFUN([ACX_CHECK_CXX_CASTS], [
 | 
|---|
| 86 |         AC_MSG_CHECKING([for C++ cast support])
 | 
|---|
| 87 |         AC_TRY_COMPILE(, [const char* f="a";const_cast<char*>(f);
 | 
|---|
| 88 |                 reinterpret_cast<const int*>(f);static_cast<int>(4.5);],
 | 
|---|
| 89 |                 [acx_cxx_cast_ok=yes],[acx_cxx_cast_ok=no])
 | 
|---|
| 90 |         AC_MSG_RESULT($acx_cxx_cast_ok)
 | 
|---|
| 91 |         if test x"$acx_cxx_cast_ok" = xyes; then
 | 
|---|
| 92 |                 ifelse([$1],,AC_DEFINE(HAVE_CXX_CASTS,1,[Define if your compiler has C++ cast support.]),[$1])
 | 
|---|
| 93 |                 :
 | 
|---|
| 94 |         else
 | 
|---|
| 95 |                 acx_cxx_cast_ok=no
 | 
|---|
| 96 |                 $2
 | 
|---|
| 97 |         fi
 | 
|---|
| 98 | ])dnl ACX_CHECK_CXX_CASTS
 | 
|---|
| 99 | 
 | 
|---|
| 100 | AC_DEFUN([ACX_CHECK_CXX_MUTABLE], [
 | 
|---|
| 101 |         AC_MSG_CHECKING([for mutable support])
 | 
|---|
| 102 |         AC_TRY_COMPILE(, [struct A{mutable int b;void f() const {b=0;}};
 | 
|---|
| 103 |                 A a;a.f();],[acx_cxx_mutable_ok=yes],[acx_cxx_mutable_ok=no])
 | 
|---|
| 104 |         AC_MSG_RESULT($acx_cxx_mutable_ok)
 | 
|---|
| 105 |         if test x"$acx_cxx_mutable_ok" = xyes; then
 | 
|---|
| 106 |                 ifelse([$1],,AC_DEFINE(HAVE_CXX_MUTABLE,1,[Define if your compiler has mutable support.]),[$1])
 | 
|---|
| 107 |                 :
 | 
|---|
| 108 |         else
 | 
|---|
| 109 |                 acx_cxx_mutable_ok=no
 | 
|---|
| 110 |                 $2
 | 
|---|
| 111 |         fi
 | 
|---|
| 112 | ])dnl ACX_CHECK_CXX_MUTABLE
 | 
|---|
| 113 | 
 | 
|---|
| 114 | AC_DEFUN([ACX_CHECK_CXX_STDLIB], [
 | 
|---|
| 115 |         AC_MSG_CHECKING([for C++ standard library])
 | 
|---|
| 116 |         AC_TRY_LINK([#include <set>], [std::set<int> a; a.insert(3);],
 | 
|---|
| 117 |                 [acx_cxx_stdlib_ok=yes],[acx_cxx_stdlib_ok=no])
 | 
|---|
| 118 |         AC_MSG_RESULT($acx_cxx_stdlib_ok)
 | 
|---|
| 119 |         if test x"$acx_cxx_stdlib_ok" = xyes; then
 | 
|---|
| 120 |                 ifelse([$1],,AC_DEFINE(HAVE_CXX_STDLIB,1,[Define if your compiler has standard C++ library support.]),[$1])
 | 
|---|
| 121 |                 :
 | 
|---|
| 122 |         else
 | 
|---|
| 123 |                 acx_cxx_stdlib_ok=no
 | 
|---|
| 124 |                 $2
 | 
|---|
| 125 |         fi
 | 
|---|
| 126 | ])dnl ACX_CHECK_CXX_STDLIB
 | 
|---|
| 127 | 
 | 
|---|
| 128 | AC_DEFUN([ACX_CHECK_GETPWUID_R], [
 | 
|---|
| 129 |         AC_MSG_CHECKING([for working getpwuid_r])
 | 
|---|
| 130 |         AC_TRY_LINK([#include <pwd.h>],
 | 
|---|
| 131 |                 [char buffer[4096]; struct passwd pwd, *pwdp;
 | 
|---|
| 132 |                 getpwuid_r(0, &pwd, buffer, sizeof(buffer), &pwdp);],
 | 
|---|
| 133 |                 acx_getpwuid_r_ok=yes, acx_getpwuid_r_ok=no)
 | 
|---|
| 134 |         AC_MSG_RESULT($acx_getpwuid_r_ok)
 | 
|---|
| 135 |         if test x"$acx_getpwuid_r_ok" = xyes; then
 | 
|---|
| 136 |                 ifelse([$1],,AC_DEFINE(HAVE_GETPWUID_R,1,[Define if you have a working \`getpwuid_r\' function.]),[$1])
 | 
|---|
| 137 |                 :
 | 
|---|
| 138 |         else
 | 
|---|
| 139 |                 acx_getpwuid_r_ok=no
 | 
|---|
| 140 |                 $2
 | 
|---|
| 141 |         fi
 | 
|---|
| 142 | ])dnl ACX_CHECK_GETPWUID_R
 | 
|---|
| 143 | 
 | 
|---|
| 144 | AC_DEFUN([ACX_CHECK_POLL], [
 | 
|---|
| 145 |     AC_MSG_CHECKING([for poll])
 | 
|---|
| 146 |     AC_TRY_LINK([#include <poll.h>],
 | 
|---|
| 147 |                                 [#if defined(_POLL_EMUL_H_)
 | 
|---|
| 148 |                                 #error emulated poll
 | 
|---|
| 149 |                                 #endif
 | 
|---|
| 150 |                 struct pollfd ufds[] = { 0, POLLIN, 0 }; poll(ufds, 1, 10);],
 | 
|---|
| 151 |                 acx_poll_ok=yes, acx_poll_ok=no)
 | 
|---|
| 152 |         AC_MSG_RESULT($acx_poll_ok)
 | 
|---|
| 153 |         if test x"$acx_poll_ok" = xyes; then
 | 
|---|
| 154 |                 ifelse([$1],,AC_DEFINE(HAVE_POLL,1,[Define if you have the \`poll\' function.]),[$1])
 | 
|---|
| 155 |                 :
 | 
|---|
| 156 |         else
 | 
|---|
| 157 |                 acx_poll_ok=no
 | 
|---|
| 158 |                 $2
 | 
|---|
| 159 |         fi
 | 
|---|
| 160 | ])dnl ACX_CHECK_POLL
 | 
|---|
| 161 | 
 | 
|---|
| 162 | dnl See if we need extra libraries for nanosleep
 | 
|---|
| 163 | AC_DEFUN([ACX_CHECK_NANOSLEEP], [
 | 
|---|
| 164 |         acx_nanosleep_ok=no
 | 
|---|
| 165 |         acx_nanosleep_list=""
 | 
|---|
| 166 | 
 | 
|---|
| 167 |         dnl check if user has set NANOSLEEP_LIBS
 | 
|---|
| 168 |         save_user_NANOSLEEP_LIBS="$NANOSLEEP_LIBS"
 | 
|---|
| 169 |         if test x"$NANOSLEEP_LIBS" != x; then
 | 
|---|
| 170 |                 acx_nanosleep_list=user
 | 
|---|
| 171 |         fi
 | 
|---|
| 172 | 
 | 
|---|
| 173 |         dnl check various libraries (including no extra libraries) for
 | 
|---|
| 174 |         dnl nanosleep.  `none' should appear first.
 | 
|---|
| 175 |         acx_nanosleep_list="none $acx_nanosleep_list rt"
 | 
|---|
| 176 |         for flag in $acx_nanosleep_list; do
 | 
|---|
| 177 |         case $flag in
 | 
|---|
| 178 |             none)
 | 
|---|
| 179 |             AC_MSG_CHECKING([for nanosleep])
 | 
|---|
| 180 |             NANOSLEEP_LIBS=""
 | 
|---|
| 181 |             ;;
 | 
|---|
| 182 | 
 | 
|---|
| 183 |             user)
 | 
|---|
| 184 |             AC_MSG_CHECKING([for nanosleep in $save_user_NANOSLEEP_LIBS])
 | 
|---|
| 185 |                         NANOSLEEP_LIBS="$save_user_NANOSLEEP_LIBS"
 | 
|---|
| 186 |             ;;
 | 
|---|
| 187 | 
 | 
|---|
| 188 |             *)
 | 
|---|
| 189 |             AC_MSG_CHECKING([for nanosleep in -l$flag])
 | 
|---|
| 190 |             NANOSLEEP_LIBS="-l$flag"
 | 
|---|
| 191 |             ;;
 | 
|---|
| 192 |         esac
 | 
|---|
| 193 | 
 | 
|---|
| 194 |         save_LIBS="$LIBS"
 | 
|---|
| 195 |         LIBS="$NANOSLEEP_LIBS $LIBS"
 | 
|---|
| 196 |         AC_TRY_LINK([#include <time.h>],
 | 
|---|
| 197 |                         [struct timespec t = { 1, 1000 }; nanosleep(&t, NULL);],
 | 
|---|
| 198 |                         acx_nanosleep_ok=yes, acx_nanosleep_ok=no)
 | 
|---|
| 199 |                 LIBS="$save_LIBS"
 | 
|---|
| 200 |         AC_MSG_RESULT($acx_nanosleep_ok)
 | 
|---|
| 201 |         if test x"$acx_nanosleep_ok" = xyes; then
 | 
|---|
| 202 |             break;
 | 
|---|
| 203 |         fi
 | 
|---|
| 204 |         NANOSLEEP_LIBS=""
 | 
|---|
| 205 |         done
 | 
|---|
| 206 | 
 | 
|---|
| 207 |         AC_SUBST(NANOSLEEP_LIBS)
 | 
|---|
| 208 | 
 | 
|---|
| 209 |         # execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
 | 
|---|
| 210 |         if test x"$acx_nanosleep_ok" = xyes; then
 | 
|---|
| 211 |                 ifelse([$1],,AC_DEFINE(HAVE_NANOSLEEP,1,[Define if you have the \`nanosleep\' function.]),[$1])
 | 
|---|
| 212 |                 :
 | 
|---|
| 213 |         else
 | 
|---|
| 214 |                 acx_nanosleep_ok=no
 | 
|---|
| 215 |                 $2
 | 
|---|
| 216 |         fi
 | 
|---|
| 217 | ])dnl ACX_CHECK_NANOSLEEP
 | 
|---|
| 218 | 
 | 
|---|
| 219 | dnl See if we need extra libraries for inet_aton
 | 
|---|
| 220 | AC_DEFUN([ACX_CHECK_INET_ATON], [
 | 
|---|
| 221 |         acx_inet_aton_ok=no
 | 
|---|
| 222 |         acx_inet_aton_list=""
 | 
|---|
| 223 | 
 | 
|---|
| 224 |         dnl check if user has set INET_ATON_LIBS
 | 
|---|
| 225 |         save_user_INET_ATON_LIBS="$INET_ATON_LIBS"
 | 
|---|
| 226 |         if test x"$INET_ATON_LIBS" != x; then
 | 
|---|
| 227 |                 acx_inet_aton_list=user
 | 
|---|
| 228 |         fi
 | 
|---|
| 229 | 
 | 
|---|
| 230 |         dnl check various libraries (including no extra libraries) for
 | 
|---|
| 231 |         dnl inet_aton.  `none' should appear first.
 | 
|---|
| 232 |         acx_inet_aton_list="none $acx_inet_aton_list resolv"
 | 
|---|
| 233 |         for flag in $acx_inet_aton_list; do
 | 
|---|
| 234 |         case $flag in
 | 
|---|
| 235 |             none)
 | 
|---|
| 236 |             AC_MSG_CHECKING([for inet_aton])
 | 
|---|
| 237 |             INET_ATON_LIBS=""
 | 
|---|
| 238 |             ;;
 | 
|---|
| 239 | 
 | 
|---|
| 240 |             user)
 | 
|---|
| 241 |             AC_MSG_CHECKING([for inet_aton in $save_user_INET_ATON_LIBS])
 | 
|---|
| 242 |                         INET_ATON_LIBS="$save_user_INET_ATON_LIBS"
 | 
|---|
| 243 |             ;;
 | 
|---|
| 244 | 
 | 
|---|
| 245 |             *)
 | 
|---|
| 246 |             AC_MSG_CHECKING([for inet_aton in -l$flag])
 | 
|---|
| 247 |             INET_ATON_LIBS="-l$flag"
 | 
|---|
| 248 |             ;;
 | 
|---|
| 249 |         esac
 | 
|---|
| 250 | 
 | 
|---|
| 251 |         save_LIBS="$LIBS"
 | 
|---|
| 252 |         LIBS="$INET_ATON_LIBS $LIBS"
 | 
|---|
| 253 |         AC_TRY_LINK([#include <sys/types.h>
 | 
|---|
| 254 |                                         #include <sys/socket.h>
 | 
|---|
| 255 |                                         #include <netinet/in.h>
 | 
|---|
| 256 |                                         #include <arpa/inet.h>],
 | 
|---|
| 257 |                         [struct in_addr addr; inet_aton("foo.bar", &addr);],
 | 
|---|
| 258 |                         acx_inet_aton_ok=yes, acx_inet_aton_ok=no)
 | 
|---|
| 259 |                 LIBS="$save_LIBS"
 | 
|---|
| 260 |         AC_MSG_RESULT($acx_inet_aton_ok)
 | 
|---|
| 261 |         if test x"$acx_inet_aton_ok" = xyes; then
 | 
|---|
| 262 |                 AC_DEFINE(HAVE_INET_ATON,1,[Define if you have the \`inet_aton\' function.])
 | 
|---|
| 263 |             break;
 | 
|---|
| 264 |         fi
 | 
|---|
| 265 |         INET_ATON_LIBS=""
 | 
|---|
| 266 |         done
 | 
|---|
| 267 | 
 | 
|---|
| 268 |         AC_SUBST(INET_ATON_LIBS)
 | 
|---|
| 269 | ])dnl ACX_CHECK_INET_ATON
 | 
|---|
| 270 | 
 | 
|---|
| 271 | dnl The following macros are from http://www.gnu.org/software/ac-archive/
 | 
|---|
| 272 | dnl which distributes them under the following license:
 | 
|---|
| 273 | dnl
 | 
|---|
| 274 | dnl Every Autoconf macro presented on this web site is free software; you can
 | 
|---|
| 275 | dnl redistribute it and/or modify it under the terms of the GNU General
 | 
|---|
| 276 | dnl Public License as published by the Free Software Foundation; either
 | 
|---|
| 277 | dnl version 2, or (at your option) any later version.
 | 
|---|
| 278 | dnl 
 | 
|---|
| 279 | dnl They are distributed in the hope that they will be useful, but WITHOUT
 | 
|---|
| 280 | dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 | 
|---|
| 281 | dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 | 
|---|
| 282 | dnl more details. (You should have received a copy of the GNU General Public
 | 
|---|
| 283 | dnl License along with this program; if not, write to the Free Software
 | 
|---|
| 284 | dnl Foundation, Inc., 59 Temple Place -- Suite 330, Boston, MA 02111-1307,
 | 
|---|
| 285 | dnl USA.)
 | 
|---|
| 286 | dnl 
 | 
|---|
| 287 | dnl As a special exception, the Free Software Foundation gives unlimited
 | 
|---|
| 288 | dnl permission to copy, distribute and modify the configure scripts that are
 | 
|---|
| 289 | dnl the output of Autoconf. You need not follow the terms of the GNU General
 | 
|---|
| 290 | dnl Public License when using or distributing such scripts, even though
 | 
|---|
| 291 | dnl portions of the text of Autoconf appear in them. The GNU General Public
 | 
|---|
| 292 | dnl License (GPL) does govern all other use of the material that constitutes
 | 
|---|
| 293 | dnl the Autoconf program.
 | 
|---|
| 294 | dnl 
 | 
|---|
| 295 | dnl Certain portions of the Autoconf source text are designed to be copied
 | 
|---|
| 296 | dnl (in certain cases, depending on the input) into the output of Autoconf.
 | 
|---|
| 297 | dnl We call these the "data" portions. The rest of the Autoconf source text
 | 
|---|
| 298 | dnl consists of comments plus executable code that decides which of the data
 | 
|---|
| 299 | dnl portions to output in any given case. We call these comments and
 | 
|---|
| 300 | dnl executable code the "non-data" portions. Autoconf never copies any of the
 | 
|---|
| 301 | dnl non-data portions into its output.
 | 
|---|
| 302 | dnl 
 | 
|---|
| 303 | dnl This special exception to the GPL applies to versions of Autoconf
 | 
|---|
| 304 | dnl released by the Free Software Foundation. When you make and distribute a
 | 
|---|
| 305 | dnl modified version of Autoconf, you may extend this special exception to
 | 
|---|
| 306 | dnl the GPL to apply to your modified version as well, *unless* your modified
 | 
|---|
| 307 | dnl version has the potential to copy into its output some of the text that
 | 
|---|
| 308 | dnl was the non-data portion of the version that you started with. (In other
 | 
|---|
| 309 | dnl words, unless your change moves or copies text from the non-data portions
 | 
|---|
| 310 | dnl to the data portions.) If your modification has such potential, you must
 | 
|---|
| 311 | dnl delete any notice of this special exception to the GPL from your modified
 | 
|---|
| 312 | dnl version
 | 
|---|
| 313 | 
 | 
|---|
| 314 | AC_DEFUN([ACX_PTHREAD], [
 | 
|---|
| 315 | AC_REQUIRE([AC_CANONICAL_HOST])
 | 
|---|
| 316 | AC_LANG_SAVE
 | 
|---|
| 317 | AC_LANG_C
 | 
|---|
| 318 | acx_pthread_ok=no
 | 
|---|
| 319 | 
 | 
|---|
| 320 | # We used to check for pthread.h first, but this fails if pthread.h
 | 
|---|
| 321 | # requires special compiler flags (e.g. on True64 or Sequent).
 | 
|---|
| 322 | # It gets checked for in the link test anyway.
 | 
|---|
| 323 | 
 | 
|---|
| 324 | # First of all, check if the user has set any of the PTHREAD_LIBS,
 | 
|---|
| 325 | # etcetera environment variables, and if threads linking works using
 | 
|---|
| 326 | # them:
 | 
|---|
| 327 | if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
 | 
|---|
| 328 |         save_CFLAGS="$CFLAGS"
 | 
|---|
| 329 |         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 | 
|---|
| 330 |         save_LIBS="$LIBS"
 | 
|---|
| 331 |         LIBS="$PTHREAD_LIBS $LIBS"
 | 
|---|
| 332 |         AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
 | 
|---|
| 333 |         AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
 | 
|---|
| 334 |         AC_MSG_RESULT($acx_pthread_ok)
 | 
|---|
| 335 |         if test x"$acx_pthread_ok" = xno; then
 | 
|---|
| 336 |                 PTHREAD_LIBS=""
 | 
|---|
| 337 |                 PTHREAD_CFLAGS=""
 | 
|---|
| 338 |         fi
 | 
|---|
| 339 |         LIBS="$save_LIBS"
 | 
|---|
| 340 |         CFLAGS="$save_CFLAGS"
 | 
|---|
| 341 | fi
 | 
|---|
| 342 | 
 | 
|---|
| 343 | # We must check for the threads library under a number of different
 | 
|---|
| 344 | # names; the ordering is very important because some systems
 | 
|---|
| 345 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
 | 
|---|
| 346 | # libraries is broken (non-POSIX).
 | 
|---|
| 347 | 
 | 
|---|
| 348 | # Create a list of thread flags to try.  Items starting with a "-" are
 | 
|---|
| 349 | # C compiler flags, and other items are library names, except for "none"
 | 
|---|
| 350 | # which indicates that we try without any flags at all, and "pthread-config"
 | 
|---|
| 351 | # which is a program returning the flags for the Pth emulation library.
 | 
|---|
| 352 | 
 | 
|---|
| 353 | acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
 | 
|---|
| 354 | 
 | 
|---|
| 355 | # The ordering *is* (sometimes) important.  Some notes on the
 | 
|---|
| 356 | # individual items follow:
 | 
|---|
| 357 | 
 | 
|---|
| 358 | # pthreads: AIX (must check this before -lpthread)
 | 
|---|
| 359 | # none: in case threads are in libc; should be tried before -Kthread and
 | 
|---|
| 360 | #       other compiler flags to prevent continual compiler warnings
 | 
|---|
| 361 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
 | 
|---|
| 362 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
 | 
|---|
| 363 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
 | 
|---|
| 364 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
 | 
|---|
| 365 | # -pthreads: Solaris/gcc
 | 
|---|
| 366 | # -mthreads: Mingw32/gcc, Lynx/gcc
 | 
|---|
| 367 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
 | 
|---|
| 368 | #      doesn't hurt to check since this sometimes defines pthreads too;
 | 
|---|
| 369 | #      also defines -D_REENTRANT)
 | 
|---|
| 370 | # pthread: Linux, etcetera
 | 
|---|
| 371 | # --thread-safe: KAI C++
 | 
|---|
| 372 | # pthread-config: use pthread-config program (for GNU Pth library)
 | 
|---|
| 373 | 
 | 
|---|
| 374 | case "${host_cpu}-${host_os}" in
 | 
|---|
| 375 |         *solaris*)
 | 
|---|
| 376 | 
 | 
|---|
| 377 |         # On Solaris (at least, for some versions), libc contains stubbed
 | 
|---|
| 378 |         # (non-functional) versions of the pthreads routines, so link-based
 | 
|---|
| 379 |         # tests will erroneously succeed.  (We need to link with -pthread or
 | 
|---|
| 380 |         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
 | 
|---|
| 381 |         # a function called by this macro, so we could check for that, but
 | 
|---|
| 382 |         # who knows whether they'll stub that too in a future libc.)  So,
 | 
|---|
| 383 |         # we'll just look for -pthreads and -lpthread first:
 | 
|---|
| 384 | 
 | 
|---|
| 385 |         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
 | 
|---|
| 386 |         ;;
 | 
|---|
| 387 | esac
 | 
|---|
| 388 | 
 | 
|---|
| 389 | if test x"$acx_pthread_ok" = xno; then
 | 
|---|
| 390 | for flag in $acx_pthread_flags; do
 | 
|---|
| 391 | 
 | 
|---|
| 392 |         case $flag in
 | 
|---|
| 393 |                 none)
 | 
|---|
| 394 |                 AC_MSG_CHECKING([whether pthreads work without any flags])
 | 
|---|
| 395 |                 ;;
 | 
|---|
| 396 | 
 | 
|---|
| 397 |                 -*)
 | 
|---|
| 398 |                 AC_MSG_CHECKING([whether pthreads work with $flag])
 | 
|---|
| 399 |                 PTHREAD_CFLAGS="$flag"
 | 
|---|
| 400 |                 ;;
 | 
|---|
| 401 | 
 | 
|---|
| 402 |                 pthread-config)
 | 
|---|
| 403 |                 AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
 | 
|---|
| 404 |                 if test x"$acx_pthread_config" = xno; then continue; fi
 | 
|---|
| 405 |                 PTHREAD_CFLAGS="`pthread-config --cflags`"
 | 
|---|
| 406 |                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
 | 
|---|
| 407 |                 ;;
 | 
|---|
| 408 | 
 | 
|---|
| 409 |                 *)
 | 
|---|
| 410 |                 AC_MSG_CHECKING([for the pthreads library -l$flag])
 | 
|---|
| 411 |                 PTHREAD_LIBS="-l$flag"
 | 
|---|
| 412 |                 ;;
 | 
|---|
| 413 |         esac
 | 
|---|
| 414 | 
 | 
|---|
| 415 |         save_LIBS="$LIBS"
 | 
|---|
| 416 |         save_CFLAGS="$CFLAGS"
 | 
|---|
| 417 |         LIBS="$PTHREAD_LIBS $LIBS"
 | 
|---|
| 418 |         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 | 
|---|
| 419 | 
 | 
|---|
| 420 |         # Check for various functions.  We must include pthread.h,
 | 
|---|
| 421 |         # since some functions may be macros.  (On the Sequent, we
 | 
|---|
| 422 |         # need a special flag -Kthread to make this header compile.)
 | 
|---|
| 423 |         # We check for pthread_join because it is in -lpthread on IRIX
 | 
|---|
| 424 |         # while pthread_create is in libc.  We check for pthread_attr_init
 | 
|---|
| 425 |         # due to DEC craziness with -lpthreads.  We check for
 | 
|---|
| 426 |         # pthread_cleanup_push because it is one of the few pthread
 | 
|---|
| 427 |         # functions on Solaris that doesn't have a non-functional libc stub.
 | 
|---|
| 428 |         # We try pthread_create on general principles.
 | 
|---|
| 429 |         AC_TRY_LINK([#include <pthread.h>],
 | 
|---|
| 430 |                     [pthread_t th; pthread_join(th, 0);
 | 
|---|
| 431 |                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
 | 
|---|
| 432 |                      pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
 | 
|---|
| 433 |                     [acx_pthread_ok=yes])
 | 
|---|
| 434 | 
 | 
|---|
| 435 |         LIBS="$save_LIBS"
 | 
|---|
| 436 |         CFLAGS="$save_CFLAGS"
 | 
|---|
| 437 | 
 | 
|---|
| 438 |         AC_MSG_RESULT($acx_pthread_ok)
 | 
|---|
| 439 |         if test "x$acx_pthread_ok" = xyes; then
 | 
|---|
| 440 |                 break;
 | 
|---|
| 441 |         fi
 | 
|---|
| 442 | 
 | 
|---|
| 443 |         PTHREAD_LIBS=""
 | 
|---|
| 444 |         PTHREAD_CFLAGS=""
 | 
|---|
| 445 | done
 | 
|---|
| 446 | fi
 | 
|---|
| 447 | 
 | 
|---|
| 448 | # Various other checks:
 | 
|---|
| 449 | if test "x$acx_pthread_ok" = xyes; then
 | 
|---|
| 450 |         save_LIBS="$LIBS"
 | 
|---|
| 451 |         LIBS="$PTHREAD_LIBS $LIBS"
 | 
|---|
| 452 |         save_CFLAGS="$CFLAGS"
 | 
|---|
| 453 |         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 | 
|---|
| 454 | 
 | 
|---|
| 455 |         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
 | 
|---|
| 456 |         AC_MSG_CHECKING([for joinable pthread attribute])
 | 
|---|
| 457 |         attr_name=unknown
 | 
|---|
| 458 |         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
 | 
|---|
| 459 |             AC_TRY_LINK([#include <pthread.h>], [int attr=$attr;],
 | 
|---|
| 460 |                         [attr_name=$attr; break])
 | 
|---|
| 461 |         done
 | 
|---|
| 462 |         AC_MSG_RESULT($attr_name)
 | 
|---|
| 463 |         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
 | 
|---|
| 464 |             AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
 | 
|---|
| 465 |                                [Define to necessary symbol if this constant
 | 
|---|
| 466 |                                 uses a non-standard name on your system.])
 | 
|---|
| 467 |         fi
 | 
|---|
| 468 | 
 | 
|---|
| 469 |         AC_MSG_CHECKING([if more special flags are required for pthreads])
 | 
|---|
| 470 |         flag=no
 | 
|---|
| 471 |         case "${host_cpu}-${host_os}" in
 | 
|---|
| 472 |             *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
 | 
|---|
| 473 |             *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
 | 
|---|
| 474 |         esac
 | 
|---|
| 475 |         AC_MSG_RESULT(${flag})
 | 
|---|
| 476 |         if test "x$flag" != xno; then
 | 
|---|
| 477 |                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
 | 
|---|
| 478 |         fi
 | 
|---|
| 479 | 
 | 
|---|
| 480 |         # Detect POSIX sigwait()
 | 
|---|
| 481 |         AC_MSG_CHECKING([for POSIX sigwait])
 | 
|---|
| 482 |         AC_TRY_LINK([#include <pthread.h>
 | 
|---|
| 483 |                      #include <signal.h>],
 | 
|---|
| 484 |                     [sigset_t sigset; int signal; sigwait(&sigset, &signal);],
 | 
|---|
| 485 |                     ok=yes, ok=unknown)
 | 
|---|
| 486 |         if test x"$ok" = xunknown; then
 | 
|---|
| 487 |                 save_CFLAGS2="$CFLAGS"
 | 
|---|
| 488 |                 CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
 | 
|---|
| 489 |                 AC_TRY_LINK([#include <pthread.h>
 | 
|---|
| 490 |                              #include <signal.h>],
 | 
|---|
| 491 |                              [sigset_t sigset; int signal; sigwait(&sigset, &signal);],
 | 
|---|
| 492 |                              ok=-D_POSIX_PTHREAD_SEMANTICS, ok=no)
 | 
|---|
| 493 |                 CFLAGS="$save_CFLAGS2"
 | 
|---|
| 494 |         fi
 | 
|---|
| 495 |         AC_MSG_RESULT(${ok})
 | 
|---|
| 496 |         if test x"$ok" != xno; then
 | 
|---|
| 497 |                 AC_DEFINE(HAVE_POSIX_SIGWAIT,1,[Define if you have a POSIX \`sigwait\' function.])
 | 
|---|
| 498 |                 if test x"$ok" != xyes; then
 | 
|---|
| 499 |                         PTHREAD_CFLAGS="$ok $PTHREAD_CFLAGS"
 | 
|---|
| 500 |                 fi
 | 
|---|
| 501 |         fi
 | 
|---|
| 502 | 
 | 
|---|
| 503 |         # Detect pthread signal functions
 | 
|---|
| 504 |         AC_MSG_CHECKING([for pthread signal functions])
 | 
|---|
| 505 |         AC_TRY_LINK([#include <pthread.h>
 | 
|---|
| 506 |                      #include <signal.h>],
 | 
|---|
| 507 |                     [pthread_kill(pthread_self(), SIGTERM);],
 | 
|---|
| 508 |                     ok=yes, ok=no)
 | 
|---|
| 509 |         AC_MSG_RESULT(${ok})
 | 
|---|
| 510 |         if test x"$ok" = xyes; then
 | 
|---|
| 511 |                 AC_DEFINE(HAVE_PTHREAD_SIGNAL,1,[Define if you have \`pthread_sigmask\' and \`pthread_kill\' functions.])
 | 
|---|
| 512 |         fi
 | 
|---|
| 513 | 
 | 
|---|
| 514 |         LIBS="$save_LIBS"
 | 
|---|
| 515 |         CFLAGS="$save_CFLAGS"
 | 
|---|
| 516 | 
 | 
|---|
| 517 |         # More AIX lossage: must compile with cc_r
 | 
|---|
| 518 |         AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
 | 
|---|
| 519 | else
 | 
|---|
| 520 |         PTHREAD_CC="$CC"
 | 
|---|
| 521 | fi
 | 
|---|
| 522 | 
 | 
|---|
| 523 | AC_SUBST(PTHREAD_LIBS)
 | 
|---|
| 524 | AC_SUBST(PTHREAD_CFLAGS)
 | 
|---|
| 525 | AC_SUBST(PTHREAD_CC)
 | 
|---|
| 526 | 
 | 
|---|
| 527 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
 | 
|---|
| 528 | if test x"$acx_pthread_ok" = xyes; then
 | 
|---|
| 529 |         ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
 | 
|---|
| 530 |         :
 | 
|---|
| 531 | else
 | 
|---|
| 532 |         acx_pthread_ok=no
 | 
|---|
| 533 |         $2
 | 
|---|
| 534 | fi
 | 
|---|
| 535 | AC_LANG_RESTORE
 | 
|---|
| 536 | ])dnl ACX_PTHREAD
 | 
|---|
| 537 | 
 | 
|---|
| 538 | dnl enable maximum compiler warnings.  must ignore unknown pragmas to
 | 
|---|
| 539 | dnl build on solaris.
 | 
|---|
| 540 | dnl we only know how to do this for g++
 | 
|---|
| 541 | AC_DEFUN([ACX_CXX_WARNINGS], [
 | 
|---|
| 542 |         AC_MSG_CHECKING([for C++ compiler warning flags])
 | 
|---|
| 543 |         if test "$GXX" = "yes"; then
 | 
|---|
| 544 |                 acx_cxx_warnings="-Wall -Wno-unknown-pragmas"
 | 
|---|
| 545 |         fi
 | 
|---|
| 546 |         if test -n "$acx_cxx_warnings"; then
 | 
|---|
| 547 |                 CXXFLAGS="$CXXFLAGS $acx_cxx_warnings"
 | 
|---|
| 548 |         else
 | 
|---|
| 549 |                 acx_cxx_warnings="unknown"
 | 
|---|
| 550 |         fi
 | 
|---|
| 551 |         AC_MSG_RESULT($acx_cxx_warnings)
 | 
|---|
| 552 | ])dnl ACX_CXX_WARNINGS
 | 
|---|
| 553 | 
 | 
|---|
| 554 | dnl enable compiler warnings are errors
 | 
|---|
| 555 | dnl we only know how to do this for g++
 | 
|---|
| 556 | AC_DEFUN([ACX_CXX_WARNINGS_ARE_ERRORS], [
 | 
|---|
| 557 |         AC_MSG_CHECKING([for C++ compiler warning are errors flags])
 | 
|---|
| 558 |         if test "$GXX" = "yes"; then
 | 
|---|
| 559 |                 acx_cxx_warnings_are_errors="-Werror"
 | 
|---|
| 560 |         fi
 | 
|---|
| 561 |         if test -n "$acx_cxx_warnings_are_errors"; then
 | 
|---|
| 562 |                 CXXFLAGS="$CXXFLAGS $acx_cxx_warnings_are_errors"
 | 
|---|
| 563 |         else
 | 
|---|
| 564 |                 acx_cxx_warnings_are_errors="unknown"
 | 
|---|
| 565 |         fi
 | 
|---|
| 566 |         AC_MSG_RESULT($acx_cxx_warnings_are_errors)
 | 
|---|
| 567 | ])dnl ACX_CXX_WARNINGS_ARE_ERRORS
 | 
|---|
| 568 | 
 | 
|---|
| 569 | # Do all the work for Automake.                            -*- Autoconf -*-
 | 
|---|
| 570 | 
 | 
|---|
| 571 | # This macro actually does too much some checks are only needed if
 | 
|---|
| 572 | # your package does certain things.  But this isn't really a big deal.
 | 
|---|
| 573 | 
 | 
|---|
| 574 | # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
 | 
|---|
| 575 | # Free Software Foundation, Inc.
 | 
|---|
| 576 | 
 | 
|---|
| 577 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 578 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 579 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 580 | # any later version.
 | 
|---|
| 581 | 
 | 
|---|
| 582 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 583 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 584 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 585 | # GNU General Public License for more details.
 | 
|---|
| 586 | 
 | 
|---|
| 587 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 588 | # along with this program; if not, write to the Free Software
 | 
|---|
| 589 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 590 | # 02111-1307, USA.
 | 
|---|
| 591 | 
 | 
|---|
| 592 | # serial 8
 | 
|---|
| 593 | 
 | 
|---|
| 594 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 | 
|---|
| 595 | # written in clear, in which case automake, when reading aclocal.m4,
 | 
|---|
| 596 | # will think it sees a *use*, and therefore will trigger all it's
 | 
|---|
| 597 | # C support machinery.  Also note that it means that autoscan, seeing
 | 
|---|
| 598 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 | 
|---|
| 599 | 
 | 
|---|
| 600 | 
 | 
|---|
| 601 | AC_PREREQ([2.52])
 | 
|---|
| 602 | 
 | 
|---|
| 603 | # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
 | 
|---|
| 604 | # the ones we care about.
 | 
|---|
| 605 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 | 
|---|
| 606 | 
 | 
|---|
| 607 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 | 
|---|
| 608 | # AM_INIT_AUTOMAKE([OPTIONS])
 | 
|---|
| 609 | # -----------------------------------------------
 | 
|---|
| 610 | # The call with PACKAGE and VERSION arguments is the old style
 | 
|---|
| 611 | # call (pre autoconf-2.50), which is being phased out.  PACKAGE
 | 
|---|
| 612 | # and VERSION should now be passed to AC_INIT and removed from
 | 
|---|
| 613 | # the call to AM_INIT_AUTOMAKE.
 | 
|---|
| 614 | # We support both call styles for the transition.  After
 | 
|---|
| 615 | # the next Automake release, Autoconf can make the AC_INIT
 | 
|---|
| 616 | # arguments mandatory, and then we can depend on a new Autoconf
 | 
|---|
| 617 | # release and drop the old call support.
 | 
|---|
| 618 | AC_DEFUN([AM_INIT_AUTOMAKE],
 | 
|---|
| 619 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 | 
|---|
| 620 |  AC_REQUIRE([AC_PROG_INSTALL])dnl
 | 
|---|
| 621 | # test to see if srcdir already configured
 | 
|---|
| 622 | if test "`cd $srcdir && pwd`" != "`pwd`" &&
 | 
|---|
| 623 |    test -f $srcdir/config.status; then
 | 
|---|
| 624 |   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 | 
|---|
| 625 | fi
 | 
|---|
| 626 | 
 | 
|---|
| 627 | # Define the identity of the package.
 | 
|---|
| 628 | dnl Distinguish between old-style and new-style calls.
 | 
|---|
| 629 | m4_ifval([$2],
 | 
|---|
| 630 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 | 
|---|
| 631 |  AC_SUBST([PACKAGE], [$1])dnl
 | 
|---|
| 632 |  AC_SUBST([VERSION], [$2])],
 | 
|---|
| 633 | [_AM_SET_OPTIONS([$1])dnl
 | 
|---|
| 634 |  AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
 | 
|---|
| 635 |  AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
 | 
|---|
| 636 | 
 | 
|---|
| 637 | _AM_IF_OPTION([no-define],,
 | 
|---|
| 638 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 | 
|---|
| 639 |  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 | 
|---|
| 640 | 
 | 
|---|
| 641 | # Some tools Automake needs.
 | 
|---|
| 642 | AC_REQUIRE([AM_SANITY_CHECK])dnl
 | 
|---|
| 643 | AC_REQUIRE([AC_ARG_PROGRAM])dnl
 | 
|---|
| 644 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 | 
|---|
| 645 | AM_MISSING_PROG(AUTOCONF, autoconf)
 | 
|---|
| 646 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 | 
|---|
| 647 | AM_MISSING_PROG(AUTOHEADER, autoheader)
 | 
|---|
| 648 | AM_MISSING_PROG(MAKEINFO, makeinfo)
 | 
|---|
| 649 | AM_MISSING_PROG(AMTAR, tar)
 | 
|---|
| 650 | AM_PROG_INSTALL_SH
 | 
|---|
| 651 | AM_PROG_INSTALL_STRIP
 | 
|---|
| 652 | # We need awk for the "check" target.  The system "awk" is bad on
 | 
|---|
| 653 | # some platforms.
 | 
|---|
| 654 | AC_REQUIRE([AC_PROG_AWK])dnl
 | 
|---|
| 655 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 | 
|---|
| 656 | 
 | 
|---|
| 657 | _AM_IF_OPTION([no-dependencies],,
 | 
|---|
| 658 | [AC_PROVIDE_IFELSE([AC_PROG_][CC],
 | 
|---|
| 659 |                   [_AM_DEPENDENCIES(CC)],
 | 
|---|
| 660 |                   [define([AC_PROG_][CC],
 | 
|---|
| 661 |                           defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
 | 
|---|
| 662 | AC_PROVIDE_IFELSE([AC_PROG_][CXX],
 | 
|---|
| 663 |                   [_AM_DEPENDENCIES(CXX)],
 | 
|---|
| 664 |                   [define([AC_PROG_][CXX],
 | 
|---|
| 665 |                           defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 | 
|---|
| 666 | ])
 | 
|---|
| 667 | ])
 | 
|---|
| 668 | 
 | 
|---|
| 669 | # Copyright 2002  Free Software Foundation, Inc.
 | 
|---|
| 670 | 
 | 
|---|
| 671 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 672 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 673 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 674 | # any later version.
 | 
|---|
| 675 | 
 | 
|---|
| 676 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 677 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 678 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 679 | # GNU General Public License for more details.
 | 
|---|
| 680 | 
 | 
|---|
| 681 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 682 | # along with this program; if not, write to the Free Software
 | 
|---|
| 683 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 684 | 
 | 
|---|
| 685 | # AM_AUTOMAKE_VERSION(VERSION)
 | 
|---|
| 686 | # ----------------------------
 | 
|---|
| 687 | # Automake X.Y traces this macro to ensure aclocal.m4 has been
 | 
|---|
| 688 | # generated from the m4 files accompanying Automake X.Y.
 | 
|---|
| 689 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
 | 
|---|
| 690 | 
 | 
|---|
| 691 | # AM_SET_CURRENT_AUTOMAKE_VERSION
 | 
|---|
| 692 | # -------------------------------
 | 
|---|
| 693 | # Call AM_AUTOMAKE_VERSION so it can be traced.
 | 
|---|
| 694 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 | 
|---|
| 695 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 | 
|---|
| 696 |          [AM_AUTOMAKE_VERSION([1.6.3])])
 | 
|---|
| 697 | 
 | 
|---|
| 698 | # Helper functions for option handling.                    -*- Autoconf -*-
 | 
|---|
| 699 | 
 | 
|---|
| 700 | # Copyright 2001, 2002  Free Software Foundation, Inc.
 | 
|---|
| 701 | 
 | 
|---|
| 702 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 703 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 704 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 705 | # any later version.
 | 
|---|
| 706 | 
 | 
|---|
| 707 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 708 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 709 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 710 | # GNU General Public License for more details.
 | 
|---|
| 711 | 
 | 
|---|
| 712 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 713 | # along with this program; if not, write to the Free Software
 | 
|---|
| 714 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 715 | # 02111-1307, USA.
 | 
|---|
| 716 | 
 | 
|---|
| 717 | # serial 2
 | 
|---|
| 718 | 
 | 
|---|
| 719 | # _AM_MANGLE_OPTION(NAME)
 | 
|---|
| 720 | # -----------------------
 | 
|---|
| 721 | AC_DEFUN([_AM_MANGLE_OPTION],
 | 
|---|
| 722 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 | 
|---|
| 723 | 
 | 
|---|
| 724 | # _AM_SET_OPTION(NAME)
 | 
|---|
| 725 | # ------------------------------
 | 
|---|
| 726 | # Set option NAME.  Presently that only means defining a flag for this option.
 | 
|---|
| 727 | AC_DEFUN([_AM_SET_OPTION],
 | 
|---|
| 728 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 | 
|---|
| 729 | 
 | 
|---|
| 730 | # _AM_SET_OPTIONS(OPTIONS)
 | 
|---|
| 731 | # ----------------------------------
 | 
|---|
| 732 | # OPTIONS is a space-separated list of Automake options.
 | 
|---|
| 733 | AC_DEFUN([_AM_SET_OPTIONS],
 | 
|---|
| 734 | [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 | 
|---|
| 735 | 
 | 
|---|
| 736 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 | 
|---|
| 737 | # -------------------------------------------
 | 
|---|
| 738 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 | 
|---|
| 739 | AC_DEFUN([_AM_IF_OPTION],
 | 
|---|
| 740 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 | 
|---|
| 741 | 
 | 
|---|
| 742 | #
 | 
|---|
| 743 | # Check to make sure that the build environment is sane.
 | 
|---|
| 744 | #
 | 
|---|
| 745 | 
 | 
|---|
| 746 | # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 | 
|---|
| 747 | 
 | 
|---|
| 748 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 749 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 750 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 751 | # any later version.
 | 
|---|
| 752 | 
 | 
|---|
| 753 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 754 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 755 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 756 | # GNU General Public License for more details.
 | 
|---|
| 757 | 
 | 
|---|
| 758 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 759 | # along with this program; if not, write to the Free Software
 | 
|---|
| 760 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 761 | # 02111-1307, USA.
 | 
|---|
| 762 | 
 | 
|---|
| 763 | # serial 3
 | 
|---|
| 764 | 
 | 
|---|
| 765 | # AM_SANITY_CHECK
 | 
|---|
| 766 | # ---------------
 | 
|---|
| 767 | AC_DEFUN([AM_SANITY_CHECK],
 | 
|---|
| 768 | [AC_MSG_CHECKING([whether build environment is sane])
 | 
|---|
| 769 | # Just in case
 | 
|---|
| 770 | sleep 1
 | 
|---|
| 771 | echo timestamp > conftest.file
 | 
|---|
| 772 | # Do `set' in a subshell so we don't clobber the current shell's
 | 
|---|
| 773 | # arguments.  Must try -L first in case configure is actually a
 | 
|---|
| 774 | # symlink; some systems play weird games with the mod time of symlinks
 | 
|---|
| 775 | # (eg FreeBSD returns the mod time of the symlink's containing
 | 
|---|
| 776 | # directory).
 | 
|---|
| 777 | if (
 | 
|---|
| 778 |    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 | 
|---|
| 779 |    if test "$[*]" = "X"; then
 | 
|---|
| 780 |       # -L didn't work.
 | 
|---|
| 781 |       set X `ls -t $srcdir/configure conftest.file`
 | 
|---|
| 782 |    fi
 | 
|---|
| 783 |    rm -f conftest.file
 | 
|---|
| 784 |    if test "$[*]" != "X $srcdir/configure conftest.file" \
 | 
|---|
| 785 |       && test "$[*]" != "X conftest.file $srcdir/configure"; then
 | 
|---|
| 786 | 
 | 
|---|
| 787 |       # If neither matched, then we have a broken ls.  This can happen
 | 
|---|
| 788 |       # if, for instance, CONFIG_SHELL is bash and it inherits a
 | 
|---|
| 789 |       # broken ls alias from the environment.  This has actually
 | 
|---|
| 790 |       # happened.  Such a system could not be considered "sane".
 | 
|---|
| 791 |       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 | 
|---|
| 792 | alias in your environment])
 | 
|---|
| 793 |    fi
 | 
|---|
| 794 | 
 | 
|---|
| 795 |    test "$[2]" = conftest.file
 | 
|---|
| 796 |    )
 | 
|---|
| 797 | then
 | 
|---|
| 798 |    # Ok.
 | 
|---|
| 799 |    :
 | 
|---|
| 800 | else
 | 
|---|
| 801 |    AC_MSG_ERROR([newly created file is older than distributed files!
 | 
|---|
| 802 | Check your system clock])
 | 
|---|
| 803 | fi
 | 
|---|
| 804 | AC_MSG_RESULT(yes)])
 | 
|---|
| 805 | 
 | 
|---|
| 806 | #  -*- Autoconf -*-
 | 
|---|
| 807 | 
 | 
|---|
| 808 | 
 | 
|---|
| 809 | # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 | 
|---|
| 810 | 
 | 
|---|
| 811 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 812 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 813 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 814 | # any later version.
 | 
|---|
| 815 | 
 | 
|---|
| 816 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 817 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 818 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 819 | # GNU General Public License for more details.
 | 
|---|
| 820 | 
 | 
|---|
| 821 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 822 | # along with this program; if not, write to the Free Software
 | 
|---|
| 823 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 824 | # 02111-1307, USA.
 | 
|---|
| 825 | 
 | 
|---|
| 826 | # serial 3
 | 
|---|
| 827 | 
 | 
|---|
| 828 | # AM_MISSING_PROG(NAME, PROGRAM)
 | 
|---|
| 829 | # ------------------------------
 | 
|---|
| 830 | AC_DEFUN([AM_MISSING_PROG],
 | 
|---|
| 831 | [AC_REQUIRE([AM_MISSING_HAS_RUN])
 | 
|---|
| 832 | $1=${$1-"${am_missing_run}$2"}
 | 
|---|
| 833 | AC_SUBST($1)])
 | 
|---|
| 834 | 
 | 
|---|
| 835 | 
 | 
|---|
| 836 | # AM_MISSING_HAS_RUN
 | 
|---|
| 837 | # ------------------
 | 
|---|
| 838 | # Define MISSING if not defined so far and test if it supports --run.
 | 
|---|
| 839 | # If it does, set am_missing_run to use it, otherwise, to nothing.
 | 
|---|
| 840 | AC_DEFUN([AM_MISSING_HAS_RUN],
 | 
|---|
| 841 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 | 
|---|
| 842 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 | 
|---|
| 843 | # Use eval to expand $SHELL
 | 
|---|
| 844 | if eval "$MISSING --run true"; then
 | 
|---|
| 845 |   am_missing_run="$MISSING --run "
 | 
|---|
| 846 | else
 | 
|---|
| 847 |   am_missing_run=
 | 
|---|
| 848 |   AC_MSG_WARN([`missing' script is too old or missing])
 | 
|---|
| 849 | fi
 | 
|---|
| 850 | ])
 | 
|---|
| 851 | 
 | 
|---|
| 852 | # AM_AUX_DIR_EXPAND
 | 
|---|
| 853 | 
 | 
|---|
| 854 | # Copyright 2001 Free Software Foundation, Inc.
 | 
|---|
| 855 | 
 | 
|---|
| 856 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 857 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 858 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 859 | # any later version.
 | 
|---|
| 860 | 
 | 
|---|
| 861 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 862 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 863 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 864 | # GNU General Public License for more details.
 | 
|---|
| 865 | 
 | 
|---|
| 866 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 867 | # along with this program; if not, write to the Free Software
 | 
|---|
| 868 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 869 | # 02111-1307, USA.
 | 
|---|
| 870 | 
 | 
|---|
| 871 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 | 
|---|
| 872 | # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 | 
|---|
| 873 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 | 
|---|
| 874 | #
 | 
|---|
| 875 | # Of course, Automake must honor this variable whenever it calls a
 | 
|---|
| 876 | # tool from the auxiliary directory.  The problem is that $srcdir (and
 | 
|---|
| 877 | # therefore $ac_aux_dir as well) can be either absolute or relative,
 | 
|---|
| 878 | # depending on how configure is run.  This is pretty annoying, since
 | 
|---|
| 879 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top
 | 
|---|
| 880 | # source directory, any form will work fine, but in subdirectories a
 | 
|---|
| 881 | # relative path needs to be adjusted first.
 | 
|---|
| 882 | #
 | 
|---|
| 883 | # $ac_aux_dir/missing
 | 
|---|
| 884 | #    fails when called from a subdirectory if $ac_aux_dir is relative
 | 
|---|
| 885 | # $top_srcdir/$ac_aux_dir/missing
 | 
|---|
| 886 | #    fails if $ac_aux_dir is absolute,
 | 
|---|
| 887 | #    fails when called from a subdirectory in a VPATH build with
 | 
|---|
| 888 | #          a relative $ac_aux_dir
 | 
|---|
| 889 | #
 | 
|---|
| 890 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 | 
|---|
| 891 | # are both prefixed by $srcdir.  In an in-source build this is usually
 | 
|---|
| 892 | # harmless because $srcdir is `.', but things will broke when you
 | 
|---|
| 893 | # start a VPATH build or use an absolute $srcdir.
 | 
|---|
| 894 | #
 | 
|---|
| 895 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 | 
|---|
| 896 | # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 | 
|---|
| 897 | #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 | 
|---|
| 898 | # and then we would define $MISSING as
 | 
|---|
| 899 | #   MISSING="\${SHELL} $am_aux_dir/missing"
 | 
|---|
| 900 | # This will work as long as MISSING is not called from configure, because
 | 
|---|
| 901 | # unfortunately $(top_srcdir) has no meaning in configure.
 | 
|---|
| 902 | # However there are other variables, like CC, which are often used in
 | 
|---|
| 903 | # configure, and could therefore not use this "fixed" $ac_aux_dir.
 | 
|---|
| 904 | #
 | 
|---|
| 905 | # Another solution, used here, is to always expand $ac_aux_dir to an
 | 
|---|
| 906 | # absolute PATH.  The drawback is that using absolute paths prevent a
 | 
|---|
| 907 | # configured tree to be moved without reconfiguration.
 | 
|---|
| 908 | 
 | 
|---|
| 909 | # Rely on autoconf to set up CDPATH properly.
 | 
|---|
| 910 | AC_PREREQ([2.50])
 | 
|---|
| 911 | 
 | 
|---|
| 912 | AC_DEFUN([AM_AUX_DIR_EXPAND], [
 | 
|---|
| 913 | # expand $ac_aux_dir to an absolute path
 | 
|---|
| 914 | am_aux_dir=`cd $ac_aux_dir && pwd`
 | 
|---|
| 915 | ])
 | 
|---|
| 916 | 
 | 
|---|
| 917 | # AM_PROG_INSTALL_SH
 | 
|---|
| 918 | # ------------------
 | 
|---|
| 919 | # Define $install_sh.
 | 
|---|
| 920 | 
 | 
|---|
| 921 | # Copyright 2001 Free Software Foundation, Inc.
 | 
|---|
| 922 | 
 | 
|---|
| 923 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 924 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 925 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 926 | # any later version.
 | 
|---|
| 927 | 
 | 
|---|
| 928 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 929 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 930 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 931 | # GNU General Public License for more details.
 | 
|---|
| 932 | 
 | 
|---|
| 933 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 934 | # along with this program; if not, write to the Free Software
 | 
|---|
| 935 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 936 | # 02111-1307, USA.
 | 
|---|
| 937 | 
 | 
|---|
| 938 | AC_DEFUN([AM_PROG_INSTALL_SH],
 | 
|---|
| 939 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 | 
|---|
| 940 | install_sh=${install_sh-"$am_aux_dir/install-sh"}
 | 
|---|
| 941 | AC_SUBST(install_sh)])
 | 
|---|
| 942 | 
 | 
|---|
| 943 | # AM_PROG_INSTALL_STRIP
 | 
|---|
| 944 | 
 | 
|---|
| 945 | # Copyright 2001 Free Software Foundation, Inc.
 | 
|---|
| 946 | 
 | 
|---|
| 947 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 948 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 949 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 950 | # any later version.
 | 
|---|
| 951 | 
 | 
|---|
| 952 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 953 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 954 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 955 | # GNU General Public License for more details.
 | 
|---|
| 956 | 
 | 
|---|
| 957 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 958 | # along with this program; if not, write to the Free Software
 | 
|---|
| 959 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 960 | # 02111-1307, USA.
 | 
|---|
| 961 | 
 | 
|---|
| 962 | # One issue with vendor `install' (even GNU) is that you can't
 | 
|---|
| 963 | # specify the program used to strip binaries.  This is especially
 | 
|---|
| 964 | # annoying in cross-compiling environments, where the build's strip
 | 
|---|
| 965 | # is unlikely to handle the host's binaries.
 | 
|---|
| 966 | # Fortunately install-sh will honor a STRIPPROG variable, so we
 | 
|---|
| 967 | # always use install-sh in `make install-strip', and initialize
 | 
|---|
| 968 | # STRIPPROG with the value of the STRIP variable (set by the user).
 | 
|---|
| 969 | AC_DEFUN([AM_PROG_INSTALL_STRIP],
 | 
|---|
| 970 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 | 
|---|
| 971 | # Installed binaries are usually stripped using `strip' when the user
 | 
|---|
| 972 | # run `make install-strip'.  However `strip' might not be the right
 | 
|---|
| 973 | # tool to use in cross-compilation environments, therefore Automake
 | 
|---|
| 974 | # will honor the `STRIP' environment variable to overrule this program.
 | 
|---|
| 975 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 | 
|---|
| 976 | if test "$cross_compiling" != no; then
 | 
|---|
| 977 |   AC_CHECK_TOOL([STRIP], [strip], :)
 | 
|---|
| 978 | fi
 | 
|---|
| 979 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 | 
|---|
| 980 | AC_SUBST([INSTALL_STRIP_PROGRAM])])
 | 
|---|
| 981 | 
 | 
|---|
| 982 | # serial 4                                              -*- Autoconf -*-
 | 
|---|
| 983 | 
 | 
|---|
| 984 | # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
 | 
|---|
| 985 | 
 | 
|---|
| 986 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 987 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 988 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 989 | # any later version.
 | 
|---|
| 990 | 
 | 
|---|
| 991 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 992 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 993 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 994 | # GNU General Public License for more details.
 | 
|---|
| 995 | 
 | 
|---|
| 996 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 997 | # along with this program; if not, write to the Free Software
 | 
|---|
| 998 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 999 | # 02111-1307, USA.
 | 
|---|
| 1000 | 
 | 
|---|
| 1001 | 
 | 
|---|
| 1002 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 | 
|---|
| 1003 | # written in clear, in which case automake, when reading aclocal.m4,
 | 
|---|
| 1004 | # will think it sees a *use*, and therefore will trigger all it's
 | 
|---|
| 1005 | # C support machinery.  Also note that it means that autoscan, seeing
 | 
|---|
| 1006 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 | 
|---|
| 1007 | 
 | 
|---|
| 1008 | 
 | 
|---|
| 1009 | 
 | 
|---|
| 1010 | # _AM_DEPENDENCIES(NAME)
 | 
|---|
| 1011 | # ----------------------
 | 
|---|
| 1012 | # See how the compiler implements dependency checking.
 | 
|---|
| 1013 | # NAME is "CC", "CXX", "GCJ", or "OBJC".
 | 
|---|
| 1014 | # We try a few techniques and use that to set a single cache variable.
 | 
|---|
| 1015 | #
 | 
|---|
| 1016 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 | 
|---|
| 1017 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 | 
|---|
| 1018 | # dependency, and given that the user is not expected to run this macro,
 | 
|---|
| 1019 | # just rely on AC_PROG_CC.
 | 
|---|
| 1020 | AC_DEFUN([_AM_DEPENDENCIES],
 | 
|---|
| 1021 | [AC_REQUIRE([AM_SET_DEPDIR])dnl
 | 
|---|
| 1022 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 | 
|---|
| 1023 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 | 
|---|
| 1024 | AC_REQUIRE([AM_DEP_TRACK])dnl
 | 
|---|
| 1025 | 
 | 
|---|
| 1026 | ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 | 
|---|
| 1027 |        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 | 
|---|
| 1028 |        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 | 
|---|
| 1029 |        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 | 
|---|
| 1030 |                    [depcc="$$1"   am_compiler_list=])
 | 
|---|
| 1031 | 
 | 
|---|
| 1032 | AC_CACHE_CHECK([dependency style of $depcc],
 | 
|---|
| 1033 |                [am_cv_$1_dependencies_compiler_type],
 | 
|---|
| 1034 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 | 
|---|
| 1035 |   # We make a subdir and do the tests there.  Otherwise we can end up
 | 
|---|
| 1036 |   # making bogus files that we don't know about and never remove.  For
 | 
|---|
| 1037 |   # instance it was reported that on HP-UX the gcc test will end up
 | 
|---|
| 1038 |   # making a dummy file named `D' -- because `-MD' means `put the output
 | 
|---|
| 1039 |   # in D'.
 | 
|---|
| 1040 |   mkdir conftest.dir
 | 
|---|
| 1041 |   # Copy depcomp to subdir because otherwise we won't find it if we're
 | 
|---|
| 1042 |   # using a relative directory.
 | 
|---|
| 1043 |   cp "$am_depcomp" conftest.dir
 | 
|---|
| 1044 |   cd conftest.dir
 | 
|---|
| 1045 | 
 | 
|---|
| 1046 |   am_cv_$1_dependencies_compiler_type=none
 | 
|---|
| 1047 |   if test "$am_compiler_list" = ""; then
 | 
|---|
| 1048 |      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 | 
|---|
| 1049 |   fi
 | 
|---|
| 1050 |   for depmode in $am_compiler_list; do
 | 
|---|
| 1051 |     # We need to recreate these files for each test, as the compiler may
 | 
|---|
| 1052 |     # overwrite some of them when testing with obscure command lines.
 | 
|---|
| 1053 |     # This happens at least with the AIX C compiler.
 | 
|---|
| 1054 |     echo '#include "conftest.h"' > conftest.c
 | 
|---|
| 1055 |     echo 'int i;' > conftest.h
 | 
|---|
| 1056 |     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
 | 
|---|
| 1057 | 
 | 
|---|
| 1058 |     case $depmode in
 | 
|---|
| 1059 |     nosideeffect)
 | 
|---|
| 1060 |       # after this tag, mechanisms are not by side-effect, so they'll
 | 
|---|
| 1061 |       # only be used when explicitly requested
 | 
|---|
| 1062 |       if test "x$enable_dependency_tracking" = xyes; then
 | 
|---|
| 1063 |         continue
 | 
|---|
| 1064 |       else
 | 
|---|
| 1065 |         break
 | 
|---|
| 1066 |       fi
 | 
|---|
| 1067 |       ;;
 | 
|---|
| 1068 |     none) break ;;
 | 
|---|
| 1069 |     esac
 | 
|---|
| 1070 |     # We check with `-c' and `-o' for the sake of the "dashmstdout"
 | 
|---|
| 1071 |     # mode.  It turns out that the SunPro C++ compiler does not properly
 | 
|---|
| 1072 |     # handle `-M -o', and we need to detect this.
 | 
|---|
| 1073 |     if depmode=$depmode \
 | 
|---|
| 1074 |        source=conftest.c object=conftest.o \
 | 
|---|
| 1075 |        depfile=conftest.Po tmpdepfile=conftest.TPo \
 | 
|---|
| 1076 |        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
 | 
|---|
| 1077 |        grep conftest.h conftest.Po > /dev/null 2>&1 &&
 | 
|---|
| 1078 |        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 | 
|---|
| 1079 |       am_cv_$1_dependencies_compiler_type=$depmode
 | 
|---|
| 1080 |       break
 | 
|---|
| 1081 |     fi
 | 
|---|
| 1082 |   done
 | 
|---|
| 1083 | 
 | 
|---|
| 1084 |   cd ..
 | 
|---|
| 1085 |   rm -rf conftest.dir
 | 
|---|
| 1086 | else
 | 
|---|
| 1087 |   am_cv_$1_dependencies_compiler_type=none
 | 
|---|
| 1088 | fi
 | 
|---|
| 1089 | ])
 | 
|---|
| 1090 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 | 
|---|
| 1091 | ])
 | 
|---|
| 1092 | 
 | 
|---|
| 1093 | 
 | 
|---|
| 1094 | # AM_SET_DEPDIR
 | 
|---|
| 1095 | # -------------
 | 
|---|
| 1096 | # Choose a directory name for dependency files.
 | 
|---|
| 1097 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES
 | 
|---|
| 1098 | AC_DEFUN([AM_SET_DEPDIR],
 | 
|---|
| 1099 | [rm -f .deps 2>/dev/null
 | 
|---|
| 1100 | mkdir .deps 2>/dev/null
 | 
|---|
| 1101 | if test -d .deps; then
 | 
|---|
| 1102 |   DEPDIR=.deps
 | 
|---|
| 1103 | else
 | 
|---|
| 1104 |   # MS-DOS does not allow filenames that begin with a dot.
 | 
|---|
| 1105 |   DEPDIR=_deps
 | 
|---|
| 1106 | fi
 | 
|---|
| 1107 | rmdir .deps 2>/dev/null
 | 
|---|
| 1108 | AC_SUBST([DEPDIR])
 | 
|---|
| 1109 | ])
 | 
|---|
| 1110 | 
 | 
|---|
| 1111 | 
 | 
|---|
| 1112 | # AM_DEP_TRACK
 | 
|---|
| 1113 | # ------------
 | 
|---|
| 1114 | AC_DEFUN([AM_DEP_TRACK],
 | 
|---|
| 1115 | [AC_ARG_ENABLE(dependency-tracking,
 | 
|---|
| 1116 | [  --disable-dependency-tracking Speeds up one-time builds
 | 
|---|
| 1117 |   --enable-dependency-tracking  Do not reject slow dependency extractors])
 | 
|---|
| 1118 | if test "x$enable_dependency_tracking" != xno; then
 | 
|---|
| 1119 |   am_depcomp="$ac_aux_dir/depcomp"
 | 
|---|
| 1120 |   AMDEPBACKSLASH='\'
 | 
|---|
| 1121 | fi
 | 
|---|
| 1122 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 | 
|---|
| 1123 | AC_SUBST([AMDEPBACKSLASH])
 | 
|---|
| 1124 | ])
 | 
|---|
| 1125 | 
 | 
|---|
| 1126 | # Generate code to set up dependency tracking.   -*- Autoconf -*-
 | 
|---|
| 1127 | 
 | 
|---|
| 1128 | # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 | 
|---|
| 1129 | 
 | 
|---|
| 1130 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 1131 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 1132 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 1133 | # any later version.
 | 
|---|
| 1134 | 
 | 
|---|
| 1135 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 1136 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 1137 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 1138 | # GNU General Public License for more details.
 | 
|---|
| 1139 | 
 | 
|---|
| 1140 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 1141 | # along with this program; if not, write to the Free Software
 | 
|---|
| 1142 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 1143 | # 02111-1307, USA.
 | 
|---|
| 1144 | 
 | 
|---|
| 1145 | #serial 2
 | 
|---|
| 1146 | 
 | 
|---|
| 1147 | # _AM_OUTPUT_DEPENDENCY_COMMANDS
 | 
|---|
| 1148 | # ------------------------------
 | 
|---|
| 1149 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 | 
|---|
| 1150 | [for mf in $CONFIG_FILES; do
 | 
|---|
| 1151 |   # Strip MF so we end up with the name of the file.
 | 
|---|
| 1152 |   mf=`echo "$mf" | sed -e 's/:.*$//'`
 | 
|---|
| 1153 |   # Check whether this is an Automake generated Makefile or not.
 | 
|---|
| 1154 |   # We used to match only the files named `Makefile.in', but
 | 
|---|
| 1155 |   # some people rename them; so instead we look at the file content.
 | 
|---|
| 1156 |   # Grep'ing the first line is not enough: some people post-process
 | 
|---|
| 1157 |   # each Makefile.in and add a new line on top of each file to say so.
 | 
|---|
| 1158 |   # So let's grep whole file.
 | 
|---|
| 1159 |   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 | 
|---|
| 1160 |     dirpart=`AS_DIRNAME("$mf")`
 | 
|---|
| 1161 |   else
 | 
|---|
| 1162 |     continue
 | 
|---|
| 1163 |   fi
 | 
|---|
| 1164 |   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
 | 
|---|
| 1165 |   # Extract the definition of DEP_FILES from the Makefile without
 | 
|---|
| 1166 |   # running `make'.
 | 
|---|
| 1167 |   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
 | 
|---|
| 1168 |   test -z "$DEPDIR" && continue
 | 
|---|
| 1169 |   # When using ansi2knr, U may be empty or an underscore; expand it
 | 
|---|
| 1170 |   U=`sed -n -e '/^U = / s///p' < "$mf"`
 | 
|---|
| 1171 |   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
 | 
|---|
| 1172 |   # We invoke sed twice because it is the simplest approach to
 | 
|---|
| 1173 |   # changing $(DEPDIR) to its actual value in the expansion.
 | 
|---|
| 1174 |   for file in `sed -n -e '
 | 
|---|
| 1175 |     /^DEP_FILES = .*\\\\$/ {
 | 
|---|
| 1176 |       s/^DEP_FILES = //
 | 
|---|
| 1177 |       :loop
 | 
|---|
| 1178 |         s/\\\\$//
 | 
|---|
| 1179 |         p
 | 
|---|
| 1180 |         n
 | 
|---|
| 1181 |         /\\\\$/ b loop
 | 
|---|
| 1182 |       p
 | 
|---|
| 1183 |     }
 | 
|---|
| 1184 |     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
 | 
|---|
| 1185 |        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 | 
|---|
| 1186 |     # Make sure the directory exists.
 | 
|---|
| 1187 |     test -f "$dirpart/$file" && continue
 | 
|---|
| 1188 |     fdir=`AS_DIRNAME(["$file"])`
 | 
|---|
| 1189 |     AS_MKDIR_P([$dirpart/$fdir])
 | 
|---|
| 1190 |     # echo "creating $dirpart/$file"
 | 
|---|
| 1191 |     echo '# dummy' > "$dirpart/$file"
 | 
|---|
| 1192 |   done
 | 
|---|
| 1193 | done
 | 
|---|
| 1194 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 | 
|---|
| 1195 | 
 | 
|---|
| 1196 | 
 | 
|---|
| 1197 | # AM_OUTPUT_DEPENDENCY_COMMANDS
 | 
|---|
| 1198 | # -----------------------------
 | 
|---|
| 1199 | # This macro should only be invoked once -- use via AC_REQUIRE.
 | 
|---|
| 1200 | #
 | 
|---|
| 1201 | # This code is only required when automatic dependency tracking
 | 
|---|
| 1202 | # is enabled.  FIXME.  This creates each `.P' file that we will
 | 
|---|
| 1203 | # need in order to bootstrap the dependency handling code.
 | 
|---|
| 1204 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 | 
|---|
| 1205 | [AC_CONFIG_COMMANDS([depfiles],
 | 
|---|
| 1206 |      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 | 
|---|
| 1207 |      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 | 
|---|
| 1208 | ])
 | 
|---|
| 1209 | 
 | 
|---|
| 1210 | # Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
 | 
|---|
| 1211 | 
 | 
|---|
| 1212 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 1213 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 1214 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 1215 | # any later version.
 | 
|---|
| 1216 | 
 | 
|---|
| 1217 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 1218 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 1219 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 1220 | # GNU General Public License for more details.
 | 
|---|
| 1221 | 
 | 
|---|
| 1222 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 1223 | # along with this program; if not, write to the Free Software
 | 
|---|
| 1224 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 1225 | # 02111-1307, USA.
 | 
|---|
| 1226 | 
 | 
|---|
| 1227 | # serial 2
 | 
|---|
| 1228 | 
 | 
|---|
| 1229 | # AM_MAKE_INCLUDE()
 | 
|---|
| 1230 | # -----------------
 | 
|---|
| 1231 | # Check to see how make treats includes.
 | 
|---|
| 1232 | AC_DEFUN([AM_MAKE_INCLUDE],
 | 
|---|
| 1233 | [am_make=${MAKE-make}
 | 
|---|
| 1234 | cat > confinc << 'END'
 | 
|---|
| 1235 | doit:
 | 
|---|
| 1236 |         @echo done
 | 
|---|
| 1237 | END
 | 
|---|
| 1238 | # If we don't find an include directive, just comment out the code.
 | 
|---|
| 1239 | AC_MSG_CHECKING([for style of include used by $am_make])
 | 
|---|
| 1240 | am__include="#"
 | 
|---|
| 1241 | am__quote=
 | 
|---|
| 1242 | _am_result=none
 | 
|---|
| 1243 | # First try GNU make style include.
 | 
|---|
| 1244 | echo "include confinc" > confmf
 | 
|---|
| 1245 | # We grep out `Entering directory' and `Leaving directory'
 | 
|---|
| 1246 | # messages which can occur if `w' ends up in MAKEFLAGS.
 | 
|---|
| 1247 | # In particular we don't look at `^make:' because GNU make might
 | 
|---|
| 1248 | # be invoked under some other name (usually "gmake"), in which
 | 
|---|
| 1249 | # case it prints its new name instead of `make'.
 | 
|---|
| 1250 | if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
 | 
|---|
| 1251 |    am__include=include
 | 
|---|
| 1252 |    am__quote=
 | 
|---|
| 1253 |    _am_result=GNU
 | 
|---|
| 1254 | fi
 | 
|---|
| 1255 | # Now try BSD make style include.
 | 
|---|
| 1256 | if test "$am__include" = "#"; then
 | 
|---|
| 1257 |    echo '.include "confinc"' > confmf
 | 
|---|
| 1258 |    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 | 
|---|
| 1259 |       am__include=.include
 | 
|---|
| 1260 |       am__quote="\""
 | 
|---|
| 1261 |       _am_result=BSD
 | 
|---|
| 1262 |    fi
 | 
|---|
| 1263 | fi
 | 
|---|
| 1264 | AC_SUBST(am__include)
 | 
|---|
| 1265 | AC_SUBST(am__quote)
 | 
|---|
| 1266 | AC_MSG_RESULT($_am_result)
 | 
|---|
| 1267 | rm -f confinc confmf
 | 
|---|
| 1268 | ])
 | 
|---|
| 1269 | 
 | 
|---|
| 1270 | # AM_CONDITIONAL                                              -*- Autoconf -*-
 | 
|---|
| 1271 | 
 | 
|---|
| 1272 | # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
 | 
|---|
| 1273 | 
 | 
|---|
| 1274 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 1275 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 1276 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 1277 | # any later version.
 | 
|---|
| 1278 | 
 | 
|---|
| 1279 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 1280 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 1281 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 1282 | # GNU General Public License for more details.
 | 
|---|
| 1283 | 
 | 
|---|
| 1284 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 1285 | # along with this program; if not, write to the Free Software
 | 
|---|
| 1286 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 1287 | # 02111-1307, USA.
 | 
|---|
| 1288 | 
 | 
|---|
| 1289 | # serial 5
 | 
|---|
| 1290 | 
 | 
|---|
| 1291 | AC_PREREQ(2.52)
 | 
|---|
| 1292 | 
 | 
|---|
| 1293 | # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 | 
|---|
| 1294 | # -------------------------------------
 | 
|---|
| 1295 | # Define a conditional.
 | 
|---|
| 1296 | AC_DEFUN([AM_CONDITIONAL],
 | 
|---|
| 1297 | [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 | 
|---|
| 1298 |         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 | 
|---|
| 1299 | AC_SUBST([$1_TRUE])
 | 
|---|
| 1300 | AC_SUBST([$1_FALSE])
 | 
|---|
| 1301 | if $2; then
 | 
|---|
| 1302 |   $1_TRUE=
 | 
|---|
| 1303 |   $1_FALSE='#'
 | 
|---|
| 1304 | else
 | 
|---|
| 1305 |   $1_TRUE='#'
 | 
|---|
| 1306 |   $1_FALSE=
 | 
|---|
| 1307 | fi
 | 
|---|
| 1308 | AC_CONFIG_COMMANDS_PRE(
 | 
|---|
| 1309 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 | 
|---|
| 1310 |   AC_MSG_ERROR([conditional \"$1\" was never defined.
 | 
|---|
| 1311 | Usually this means the macro was only invoked conditionally.])
 | 
|---|
| 1312 | fi])])
 | 
|---|
| 1313 | 
 | 
|---|
| 1314 | # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
 | 
|---|
| 1315 | 
 | 
|---|
| 1316 | # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 | 
|---|
| 1317 | 
 | 
|---|
| 1318 | # This program is free software; you can redistribute it and/or modify
 | 
|---|
| 1319 | # it under the terms of the GNU General Public License as published by
 | 
|---|
| 1320 | # the Free Software Foundation; either version 2, or (at your option)
 | 
|---|
| 1321 | # any later version.
 | 
|---|
| 1322 | 
 | 
|---|
| 1323 | # This program is distributed in the hope that it will be useful,
 | 
|---|
| 1324 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 1325 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 1326 | # GNU General Public License for more details.
 | 
|---|
| 1327 | 
 | 
|---|
| 1328 | # You should have received a copy of the GNU General Public License
 | 
|---|
| 1329 | # along with this program; if not, write to the Free Software
 | 
|---|
| 1330 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
|---|
| 1331 | # 02111-1307, USA.
 | 
|---|
| 1332 | 
 | 
|---|
| 1333 | AC_PREREQ([2.52])
 | 
|---|
| 1334 | 
 | 
|---|
| 1335 | # serial 6
 | 
|---|
| 1336 | 
 | 
|---|
| 1337 | # When config.status generates a header, we must update the stamp-h file.
 | 
|---|
| 1338 | # This file resides in the same directory as the config header
 | 
|---|
| 1339 | # that is generated.  We must strip everything past the first ":",
 | 
|---|
| 1340 | # and everything past the last "/".
 | 
|---|
| 1341 | 
 | 
|---|
| 1342 | # _AM_DIRNAME(PATH)
 | 
|---|
| 1343 | # -----------------
 | 
|---|
| 1344 | # Like AS_DIRNAME, only do it during macro expansion
 | 
|---|
| 1345 | AC_DEFUN([_AM_DIRNAME],
 | 
|---|
| 1346 |        [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
 | 
|---|
| 1347 |               m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
 | 
|---|
| 1348 |                     m4_if(regexp([$1], [^/.*]), -1,
 | 
|---|
| 1349 |                           [.],
 | 
|---|
| 1350 |                           patsubst([$1], [^\(/\).*], [\1])),
 | 
|---|
| 1351 |                     patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
 | 
|---|
| 1352 |               patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
 | 
|---|
| 1353 | ])# _AM_DIRNAME
 | 
|---|
| 1354 | 
 | 
|---|
| 1355 | 
 | 
|---|
| 1356 | # The stamp files are numbered to have different names.
 | 
|---|
| 1357 | # We could number them on a directory basis, but that's additional
 | 
|---|
| 1358 | # complications, let's have a unique counter.
 | 
|---|
| 1359 | m4_define([_AM_STAMP_Count], [0])
 | 
|---|
| 1360 | 
 | 
|---|
| 1361 | 
 | 
|---|
| 1362 | # _AM_STAMP(HEADER)
 | 
|---|
| 1363 | # -----------------
 | 
|---|
| 1364 | # The name of the stamp file for HEADER.
 | 
|---|
| 1365 | AC_DEFUN([_AM_STAMP],
 | 
|---|
| 1366 | [m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
 | 
|---|
| 1367 | AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
 | 
|---|
| 1368 |                                [:.*])))/stamp-h[]_AM_STAMP_Count])
 | 
|---|
| 1369 | 
 | 
|---|
| 1370 | 
 | 
|---|
| 1371 | # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
 | 
|---|
| 1372 | # ------------------------------------------------------------
 | 
|---|
| 1373 | # We used to try to get a real timestamp in stamp-h.  But the fear is that
 | 
|---|
| 1374 | # that will cause unnecessary cvs conflicts.
 | 
|---|
| 1375 | AC_DEFUN([_AM_CONFIG_HEADER],
 | 
|---|
| 1376 | [# Add the stamp file to the list of files AC keeps track of,
 | 
|---|
| 1377 | # along with our hook.
 | 
|---|
| 1378 | AC_CONFIG_HEADERS([$1],
 | 
|---|
| 1379 |                   [# update the timestamp
 | 
|---|
| 1380 | echo 'timestamp for $1' >"_AM_STAMP([$1])"
 | 
|---|
| 1381 | $2],
 | 
|---|
| 1382 |                   [$3])
 | 
|---|
| 1383 | ])# _AM_CONFIG_HEADER
 | 
|---|
| 1384 | 
 | 
|---|
| 1385 | 
 | 
|---|
| 1386 | # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
 | 
|---|
| 1387 | # --------------------------------------------------------------
 | 
|---|
| 1388 | AC_DEFUN([AM_CONFIG_HEADER],
 | 
|---|
| 1389 | [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
 | 
|---|
| 1390 | ])# AM_CONFIG_HEADER
 | 
|---|
| 1391 | 
 | 
|---|