Annotation of parser3/src/sql/mysql/acinclude.m4, revision 1.1.2.2
1.1.2.1 paf 1: dnl acinclude.m4(
2:
1.1.2.2 ! paf 3: AC_DEFUN(CALC_ARGS,[
! 4:
! 5: AC_ARG_WITH(mysql_inc,[ --with-mysql_inc[=DIR] DIR is the MySQL includes directory],,
1.1.2.1 paf 6: withval="/usr/include/mysql"
7: )
8: MYSQL_INC=$withval
9: AC_SUBST(MYSQL_INC)
10:
1.1.2.2 ! paf 11: AC_ARG_WITH(mysql_lib,[ --with-mysql_lib[=DIR] DIR is the MySQL lib directory],,
1.1.2.1 paf 12: withval="/usr/lib/mysql"
13: )
14: MYSQL_LIB=$withval
15: AC_SUBST(MYSQL_LIB)
1.1.2.2 ! paf 16:
! 17: ])
1.1.2.1 paf 18:
19: dnl acinclude.m4)
20:
21:
22:
23:
24:
25:
26:
27: ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
28: ## Copyright (C) 1996-1999 Free Software Foundation, Inc.
29: ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
30: ##
31: ## This program is free software; you can redistribute it and/or modify
32: ## it under the terms of the GNU General Public License as published by
33: ## the Free Software Foundation; either version 2 of the License, or
34: ## (at your option) any later version.
35: ##
36: ## This program is distributed in the hope that it will be useful, but
37: ## WITHOUT ANY WARRANTY; without even the implied warranty of
38: ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
39: ## General Public License for more details.
40: ##
41: ## You should have received a copy of the GNU General Public License
42: ## along with this program; if not, write to the Free Software
43: ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
44: ##
45: ## As a special exception to the GNU General Public License, if you
46: ## distribute this file as part of a program that contains a
47: ## configuration script generated by Autoconf, you may include it under
48: ## the same distribution terms that you use for the rest of that program.
49:
50: # serial 40 AC_PROG_LIBTOOL
51: AC_DEFUN(AC_PROG_LIBTOOL,
52: [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
53:
54: # Save cache, so that ltconfig can load it
55: AC_CACHE_SAVE
56:
57: # Actually configure libtool. ac_aux_dir is where install-sh is found.
58: CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
59: LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
60: LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
61: DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
62: ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
63: $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
64: || AC_MSG_ERROR([libtool configure failed])
65:
66: # Reload cache, that may have been modified by ltconfig
67: AC_CACHE_LOAD
68:
69: # This can be used to rebuild libtool when needed
70: LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
71:
72: # Always use our own libtool.
73: LIBTOOL='$(SHELL) $(top_builddir)/libtool'
74: AC_SUBST(LIBTOOL)dnl
75:
76: # Redirect the config.log output again, so that the ltconfig log is not
77: # clobbered by the next message.
78: exec 5>>./config.log
79: ])
80:
81: AC_DEFUN(AC_LIBTOOL_SETUP,
82: [AC_PREREQ(2.13)dnl
83: AC_REQUIRE([AC_ENABLE_SHARED])dnl
84: AC_REQUIRE([AC_ENABLE_STATIC])dnl
85: AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
86: AC_REQUIRE([AC_CANONICAL_HOST])dnl
87: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
88: AC_REQUIRE([AC_PROG_RANLIB])dnl
89: AC_REQUIRE([AC_PROG_CC])dnl
90: AC_REQUIRE([AC_PROG_LD])dnl
91: AC_REQUIRE([AC_PROG_NM])dnl
92: AC_REQUIRE([AC_PROG_LN_S])dnl
93: dnl
94:
95: case "$target" in
96: NONE) lt_target="$host" ;;
97: *) lt_target="$target" ;;
98: esac
99:
100: # Check for any special flags to pass to ltconfig.
101: #
102: # the following will cause an existing older ltconfig to fail, so
103: # we ignore this at the expense of the cache file... Checking this
104: # will just take longer ... bummer!
105: #libtool_flags="--cache-file=$cache_file"
106: #
107: test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
108: test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
109: test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
110: test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
111: test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
112: ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
113: [libtool_flags="$libtool_flags --enable-dlopen"])
114: ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
115: [libtool_flags="$libtool_flags --enable-win32-dll"])
116: AC_ARG_ENABLE(libtool-lock,
117: [ --disable-libtool-lock avoid locking (might break parallel builds)])
118: test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
119: test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
120:
121: # Some flags need to be propagated to the compiler or linker for good
122: # libtool support.
123: case "$lt_target" in
124: *-*-irix6*)
125: # Find out which ABI we are using.
126: echo '[#]line __oline__ "configure"' > conftest.$ac_ext
127: if AC_TRY_EVAL(ac_compile); then
128: case "`/usr/bin/file conftest.o`" in
129: *32-bit*)
130: LD="${LD-ld} -32"
131: ;;
132: *N32*)
133: LD="${LD-ld} -n32"
134: ;;
135: *64-bit*)
136: LD="${LD-ld} -64"
137: ;;
138: esac
139: fi
140: rm -rf conftest*
141: ;;
142:
143: *-*-sco3.2v5*)
144: # On SCO OpenServer 5, we need -belf to get full-featured binaries.
145: SAVE_CFLAGS="$CFLAGS"
146: CFLAGS="$CFLAGS -belf"
147: AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
148: [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
149: if test x"$lt_cv_cc_needs_belf" != x"yes"; then
150: # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
151: CFLAGS="$SAVE_CFLAGS"
152: fi
153: ;;
154:
155: ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
156: [*-*-cygwin* | *-*-mingw*)
157: AC_CHECK_TOOL(DLLTOOL, dlltool, false)
158: AC_CHECK_TOOL(AS, as, false)
159: AC_CHECK_TOOL(OBJDUMP, objdump, false)
160: ;;
161: ])
162: esac
163: ])
164:
165: # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
166: AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
167:
168: # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
169: AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
170:
171: # AC_ENABLE_SHARED - implement the --enable-shared flag
172: # Usage: AC_ENABLE_SHARED[(DEFAULT)]
173: # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
174: # `yes'.
175: AC_DEFUN(AC_ENABLE_SHARED, [dnl
176: define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
177: AC_ARG_ENABLE(shared,
178: changequote(<<, >>)dnl
179: << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
180: changequote([, ])dnl
181: [p=${PACKAGE-default}
182: case "$enableval" in
183: yes) enable_shared=yes ;;
184: no) enable_shared=no ;;
185: *)
186: enable_shared=no
187: # Look at the argument we got. We use all the common list separators.
188: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
189: for pkg in $enableval; do
190: if test "X$pkg" = "X$p"; then
191: enable_shared=yes
192: fi
193: done
194: IFS="$ac_save_ifs"
195: ;;
196: esac],
197: enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
198: ])
199:
200: # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
201: AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
202: AC_ENABLE_SHARED(no)])
203:
204: # AC_ENABLE_STATIC - implement the --enable-static flag
205: # Usage: AC_ENABLE_STATIC[(DEFAULT)]
206: # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
207: # `yes'.
208: AC_DEFUN(AC_ENABLE_STATIC, [dnl
209: define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
210: AC_ARG_ENABLE(static,
211: changequote(<<, >>)dnl
212: << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
213: changequote([, ])dnl
214: [p=${PACKAGE-default}
215: case "$enableval" in
216: yes) enable_static=yes ;;
217: no) enable_static=no ;;
218: *)
219: enable_static=no
220: # Look at the argument we got. We use all the common list separators.
221: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
222: for pkg in $enableval; do
223: if test "X$pkg" = "X$p"; then
224: enable_static=yes
225: fi
226: done
227: IFS="$ac_save_ifs"
228: ;;
229: esac],
230: enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
231: ])
232:
233: # AC_DISABLE_STATIC - set the default static flag to --disable-static
234: AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
235: AC_ENABLE_STATIC(no)])
236:
237:
238: # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
239: # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
240: # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
241: # `yes'.
242: AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
243: define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
244: AC_ARG_ENABLE(fast-install,
245: changequote(<<, >>)dnl
246: << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
247: changequote([, ])dnl
248: [p=${PACKAGE-default}
249: case "$enableval" in
250: yes) enable_fast_install=yes ;;
251: no) enable_fast_install=no ;;
252: *)
253: enable_fast_install=no
254: # Look at the argument we got. We use all the common list separators.
255: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
256: for pkg in $enableval; do
257: if test "X$pkg" = "X$p"; then
258: enable_fast_install=yes
259: fi
260: done
261: IFS="$ac_save_ifs"
262: ;;
263: esac],
264: enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
265: ])
266:
267: # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
268: AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
269: AC_ENABLE_FAST_INSTALL(no)])
270:
271: # AC_PROG_LD - find the path to the GNU or non-GNU linker
272: AC_DEFUN(AC_PROG_LD,
273: [AC_ARG_WITH(gnu-ld,
274: [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
275: test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
276: AC_REQUIRE([AC_PROG_CC])dnl
277: AC_REQUIRE([AC_CANONICAL_HOST])dnl
278: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
279: ac_prog=ld
280: if test "$ac_cv_prog_gcc" = yes; then
281: # Check if gcc -print-prog-name=ld gives a path.
282: AC_MSG_CHECKING([for ld used by GCC])
283: ac_prog=`($CC -print-prog-name=ld) 2>&5`
284: case "$ac_prog" in
285: # Accept absolute paths.
286: changequote(,)dnl
287: [\\/]* | [A-Za-z]:[\\/]*)
288: re_direlt='/[^/][^/]*/\.\./'
289: changequote([,])dnl
290: # Canonicalize the path of ld
291: ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
292: while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
293: ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
294: done
295: test -z "$LD" && LD="$ac_prog"
296: ;;
297: "")
298: # If it fails, then pretend we aren't using GCC.
299: ac_prog=ld
300: ;;
301: *)
302: # If it is relative, then search for the first ld in PATH.
303: with_gnu_ld=unknown
304: ;;
305: esac
306: elif test "$with_gnu_ld" = yes; then
307: AC_MSG_CHECKING([for GNU ld])
308: else
309: AC_MSG_CHECKING([for non-GNU ld])
310: fi
311: AC_CACHE_VAL(ac_cv_path_LD,
312: [if test -z "$LD"; then
313: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
314: for ac_dir in $PATH; do
315: test -z "$ac_dir" && ac_dir=.
316: if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
317: ac_cv_path_LD="$ac_dir/$ac_prog"
318: # Check to see if the program is GNU ld. I'd rather use --version,
319: # but apparently some GNU ld's only accept -v.
320: # Break only if it was the GNU/non-GNU ld that we prefer.
321: if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
322: test "$with_gnu_ld" != no && break
323: else
324: test "$with_gnu_ld" != yes && break
325: fi
326: fi
327: done
328: IFS="$ac_save_ifs"
329: else
330: ac_cv_path_LD="$LD" # Let the user override the test with a path.
331: fi])
332: LD="$ac_cv_path_LD"
333: if test -n "$LD"; then
334: AC_MSG_RESULT($LD)
335: else
336: AC_MSG_RESULT(no)
337: fi
338: test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
339: AC_PROG_LD_GNU
340: ])
341:
342: AC_DEFUN(AC_PROG_LD_GNU,
343: [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
344: [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
345: if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
346: ac_cv_prog_gnu_ld=yes
347: else
348: ac_cv_prog_gnu_ld=no
349: fi])
350: ])
351:
352: # AC_PROG_NM - find the path to a BSD-compatible name lister
353: AC_DEFUN(AC_PROG_NM,
354: [AC_MSG_CHECKING([for BSD-compatible nm])
355: AC_CACHE_VAL(ac_cv_path_NM,
356: [if test -n "$NM"; then
357: # Let the user override the test.
358: ac_cv_path_NM="$NM"
359: else
360: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
361: for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
362: test -z "$ac_dir" && ac_dir=.
363: if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
364: # Check to see if the nm accepts a BSD-compat flag.
365: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
366: # nm: unknown option "B" ignored
367: if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
368: ac_cv_path_NM="$ac_dir/nm -B"
369: break
370: elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
371: ac_cv_path_NM="$ac_dir/nm -p"
372: break
373: else
374: ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
375: continue # so that we can try to find one that supports BSD flags
376: fi
377: fi
378: done
379: IFS="$ac_save_ifs"
380: test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
381: fi])
382: NM="$ac_cv_path_NM"
383: AC_MSG_RESULT([$NM])
384: ])
385:
386: # AC_CHECK_LIBM - check for math library
387: AC_DEFUN(AC_CHECK_LIBM,
388: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
389: LIBM=
390: case "$lt_target" in
391: *-*-beos* | *-*-cygwin*)
392: # These system don't have libm
393: ;;
394: *-ncr-sysv4.3*)
395: AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
396: AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
397: ;;
398: *)
399: AC_CHECK_LIB(m, main, LIBM="-lm")
400: ;;
401: esac
402: ])
403:
404: # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
405: # the libltdl convenience library, adds --enable-ltdl-convenience to
406: # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
407: # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
408: # to be `${top_builddir}/libltdl'. Make sure you start DIR with
409: # '${top_builddir}/' (note the single quotes!) if your package is not
410: # flat, and, if you're not using automake, define top_builddir as
411: # appropriate in the Makefiles.
412: AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
413: case "$enable_ltdl_convenience" in
414: no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
415: "") enable_ltdl_convenience=yes
416: ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
417: esac
418: LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
419: INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
420: ])
421:
422: # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
423: # the libltdl installable library, and adds --enable-ltdl-install to
424: # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
425: # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
426: # to be `${top_builddir}/libltdl'. Make sure you start DIR with
427: # '${top_builddir}/' (note the single quotes!) if your package is not
428: # flat, and, if you're not using automake, define top_builddir as
429: # appropriate in the Makefiles.
430: # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
431: AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
432: AC_CHECK_LIB(ltdl, main,
433: [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
434: [if test x"$enable_ltdl_install" = xno; then
435: AC_MSG_WARN([libltdl not installed, but installation disabled])
436: else
437: enable_ltdl_install=yes
438: fi
439: ])
440: if test x"$enable_ltdl_install" = x"yes"; then
441: ac_configure_args="$ac_configure_args --enable-ltdl-install"
442: LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
443: INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
444: else
445: ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
446: LIBLTDL="-lltdl"
447: INCLTDL=
448: fi
449: ])
450:
451: dnl old names
452: AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
453: AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
454: AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
455: AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
456: AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
457: AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
458: AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
459:
460: dnl This is just to silence aclocal about the macro not being used
461: ifelse([AC_DISABLE_FAST_INSTALL])dnl
E-mail: