1 dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)]
2 dnl if the cache file is inconsistent with the current host,
3 dnl target and build system types, execute CMD or print a default
5 AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
6 AC_REQUIRE([AC_CANONICAL_SYSTEM])
7 AC_MSG_CHECKING([config.cache system type])
8 if { test x"${ac_cv_host_system_type+set}" = x"set" &&
9 test x"$ac_cv_host_system_type" != x"$host"; } ||
10 { test x"${ac_cv_build_system_type+set}" = x"set" &&
11 test x"$ac_cv_build_system_type" != x"$build"; } ||
12 { test x"${ac_cv_target_system_type+set}" = x"set" &&
13 test x"$ac_cv_target_system_type" != x"$target"; }; then
14 AC_MSG_RESULT([different])
16 [AC_MSG_ERROR(["you must remove config.cache and restart configure"])])
20 ac_cv_host_system_type="$host"
21 ac_cv_build_system_type="$build"
22 ac_cv_target_system_type="$target"
26 dnl test whether dirent has a d_off member
27 AC_DEFUN(AC_DIRENT_D_OFF,
28 [AC_CACHE_CHECK([for d_off in dirent], ac_cv_dirent_d_off,
31 #include <sys/types.h>
32 #include <dirent.h>], [struct dirent d; d.d_off;],
33 ac_cv_dirent_d_off=yes, ac_cv_dirent_d_off=no)])
34 if test $ac_cv_dirent_d_off = yes; then
35 AC_DEFINE(HAVE_DIRENT_D_OFF,1,[Whether dirent has a d_off member])
39 dnl Mark specified module as shared
40 dnl SMB_MODULE(name,static_files,shared_files,subsystem,whatif-static,whatif-shared)
43 AC_MSG_CHECKING([how to build $1])
44 if test "$[MODULE_][$1]"; then
46 elif test "$[MODULE_]translit([$4], [A-Z], [a-z])" -a "$[MODULE_DEFAULT_][$1]"; then
47 DEST=$[MODULE_]translit([$4], [A-Z], [a-z])
49 DEST=$[MODULE_DEFAULT_][$1]
52 if test x"$DEST" = xSHARED; then
53 AC_DEFINE([$1][_init], [init_module], [Whether to build $1 as shared module])
54 $4_MODULES="$$4_MODULES $3"
55 AC_MSG_RESULT([shared])
57 elif test x"$DEST" = xSTATIC; then
58 [init_static_modules_]translit([$4], [A-Z], [a-z])="$[init_static_modules_]translit([$4], [A-Z], [a-z]) $1_init();"
59 string_static_modules="$string_static_modules $1"
60 $4_STATIC="$$4_STATIC $2"
63 AC_MSG_RESULT([static])
67 MODULES_CLEAN="$MODULES_CLEAN $2 $3"
70 AC_DEFUN(SMB_SUBSYSTEM,
74 AC_DEFINE_UNQUOTED([static_init_]translit([$1], [A-Z], [a-z]), [{$init_static_modules_]translit([$1], [A-Z], [a-z])[}], [Static init functions])
77 dnl AC_PROG_CC_FLAG(flag)
78 AC_DEFUN(AC_PROG_CC_FLAG,
79 [AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_cv_prog_cc_$1,
80 [echo 'void f(){}' > conftest.c
81 if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then
89 dnl see if a declaration exists for a function or variable
90 dnl defines HAVE_function_DECL if it exists
91 dnl AC_HAVE_DECL(var, includes)
92 AC_DEFUN(AC_HAVE_DECL,
94 AC_CACHE_CHECK([for $1 declaration],ac_cv_have_$1_decl,[
95 AC_TRY_COMPILE([$2],[int i = (int)$1],
96 ac_cv_have_$1_decl=yes,ac_cv_have_$1_decl=no)])
97 if test x"$ac_cv_have_$1_decl" = x"yes"; then
98 AC_DEFINE([HAVE_]translit([$1], [a-z], [A-Z])[_DECL],1,[Whether $1() is available])
103 dnl check for a function in a library, but don't
104 dnl keep adding the same library to the LIBS variable.
105 dnl AC_LIBTESTFUNC(lib,func)
106 AC_DEFUN(AC_LIBTESTFUNC,
108 *-l$1*) AC_CHECK_FUNCS($2) ;;
109 *) AC_CHECK_LIB($1, $2)
115 dnl Define an AC_DEFINE with ifndef guard.
116 dnl AC_N_DEFINE(VARIABLE [, VALUE])
118 [cat >> confdefs.h <<\EOF
120 [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
126 dnl AC_ADD_INCLUDE(VARIABLE)
127 define(AC_ADD_INCLUDE,
128 [cat >> confdefs.h <<\EOF
133 dnl Copied from libtool.m4
134 AC_DEFUN(AC_PROG_LD_GNU,
135 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
136 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
137 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
138 ac_cv_prog_gnu_ld=yes
144 # Configure paths for LIBXML2
145 # Toshio Kuratomi 2001-04-21
147 # Configure paths for GLIB
148 # Owen Taylor 97-11-3
150 dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
151 dnl Test for XML, and define XML_CFLAGS and XML_LIBS
153 AC_DEFUN(AM_PATH_XML2,[
154 AC_ARG_WITH(xml-prefix,
155 [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
156 xml_config_prefix="$withval", xml_config_prefix="")
157 AC_ARG_WITH(xml-exec-prefix,
158 [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
159 xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
160 AC_ARG_ENABLE(xmltest,
161 [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
164 if test x$xml_config_exec_prefix != x ; then
165 xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix"
166 if test x${XML2_CONFIG+set} != xset ; then
167 XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
170 if test x$xml_config_prefix != x ; then
171 xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
172 if test x${XML2_CONFIG+set} != xset ; then
173 XML2_CONFIG=$xml_config_prefix/bin/xml2-config
177 AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
178 min_xml_version=ifelse([$1], ,2.0.0,[$1])
179 AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
181 if test "$XML2_CONFIG" = "no" ; then
184 XML_CFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
185 XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
186 xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
187 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
188 xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
189 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
190 xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
191 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
192 if test "x$enable_xmltest" = "xyes" ; then
193 ac_save_CFLAGS="$CFLAGS"
195 CFLAGS="$CFLAGS $XML_CFLAGS"
196 LIBS="$XML_LIBS $LIBS"
198 dnl Now check if the installed libxml is sufficiently new.
199 dnl (Also sanity checks the results of xml2-config to some extent)
206 #include <libxml/xmlversion.h>
211 int xml_major_version, xml_minor_version, xml_micro_version;
212 int major, minor, micro;
215 system("touch conf.xmltest");
217 /* Capture xml2-config output via autoconf/configure variables */
218 /* HP/UX 9 (%@#!) writes to sscanf strings */
219 tmp_version = (char *)strdup("$min_xml_version");
220 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
221 printf("%s, bad version string from xml2-config\n", "$min_xml_version");
226 /* Capture the version information from the header files */
227 tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
228 if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
229 printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
234 /* Compare xml2-config output to the libxml headers */
235 if ((xml_major_version != $xml_config_major_version) ||
236 (xml_minor_version != $xml_config_minor_version) ||
237 (xml_micro_version != $xml_config_micro_version))
239 printf("*** libxml header files (version %d.%d.%d) do not match\n",
240 xml_major_version, xml_minor_version, xml_micro_version);
241 printf("*** xml2-config (version %d.%d.%d)\n",
242 $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
245 /* Compare the headers to the library to make sure we match */
246 /* Less than ideal -- doesn't provide us with return value feedback,
247 * only exits if there's a serious mismatch between header and library.
251 /* Test that the library is greater than our minimum version */
252 if ((xml_major_version > major) ||
253 ((xml_major_version == major) && (xml_minor_version > minor)) ||
254 ((xml_major_version == major) && (xml_minor_version == minor) &&
255 (xml_micro_version >= micro)))
261 printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
262 xml_major_version, xml_minor_version, xml_micro_version);
263 printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
264 major, minor, micro);
265 printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
267 printf("*** If you have already installed a sufficiently new version, this error\n");
268 printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
269 printf("*** being found. The easiest way to fix this is to remove the old version\n");
270 printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
271 printf("*** correct copy of xml2-config. (In this case, you will have to\n");
272 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
273 printf("*** so that the correct libraries are found at run-time))\n");
277 ],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
278 CFLAGS="$ac_save_CFLAGS"
283 if test "x$no_xml" = x ; then
284 AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
285 ifelse([$2], , :, [$2])
288 if test "$XML2_CONFIG" = "no" ; then
289 echo "*** The xml2-config script installed by LIBXML could not be found"
290 echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
291 echo "*** your path, or set the XML2_CONFIG environment variable to the"
292 echo "*** full path to xml2-config."
294 if test -f conf.xmltest ; then
297 echo "*** Could not run libxml test program, checking why..."
298 CFLAGS="$CFLAGS $XML_CFLAGS"
299 LIBS="$LIBS $XML_LIBS"
301 #include <libxml/xmlversion.h>
303 ], [ LIBXML_TEST_VERSION; return 0;],
304 [ echo "*** The test program compiled, but did not run. This usually means"
305 echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
306 echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
307 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
308 echo "*** to the installed location Also, make sure you have run ldconfig if that"
309 echo "*** is required on your system"
311 echo "*** If you have an old version installed, it is best to remove it, although"
312 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
313 [ echo "*** The test program failed to compile or link. See the file config.log for the"
314 echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
315 echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
316 echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
317 CFLAGS="$ac_save_CFLAGS"
324 ifelse([$3], , :, [$3])
331 # =========================================================================
332 # AM_PATH_MYSQL : MySQL library
334 dnl AM_PATH_MYSQL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
335 dnl Test for MYSQL, and define MYSQL_CFLAGS and MYSQL_LIBS
337 AC_DEFUN(AM_PATH_MYSQL,
339 dnl Get the cflags and libraries from the mysql_config script
341 AC_ARG_WITH(mysql-prefix,[ --with-mysql-prefix=PFX Prefix where MYSQL is installed (optional)],
342 mysql_prefix="$withval", mysql_prefix="")
343 AC_ARG_WITH(mysql-exec-prefix,[ --with-mysql-exec-prefix=PFX Exec prefix where MYSQL is installed (optional)],
344 mysql_exec_prefix="$withval", mysql_exec_prefix="")
345 AC_ARG_ENABLE(mysqltest, [ --disable-mysqltest Do not try to compile and run a test MYSQL program],
346 , enable_mysqltest=yes)
348 if test x$mysql_exec_prefix != x ; then
349 mysql_args="$mysql_args --exec-prefix=$mysql_exec_prefix"
350 if test x${MYSQL_CONFIG+set} != xset ; then
351 MYSQL_CONFIG=$mysql_exec_prefix/bin/mysql_config
354 if test x$mysql_prefix != x ; then
355 mysql_args="$mysql_args --prefix=$mysql_prefix"
356 if test x${MYSQL_CONFIG+set} != xset ; then
357 MYSQL_CONFIG=$mysql_prefix/bin/mysql_config
361 AC_REQUIRE([AC_CANONICAL_TARGET])
362 AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no)
363 min_mysql_version=ifelse([$1], ,0.11.0,$1)
364 AC_MSG_CHECKING(for MYSQL - version >= $min_mysql_version)
366 if test "$MYSQL_CONFIG" = "no" ; then
369 MYSQL_CFLAGS=`$MYSQL_CONFIG $mysqlconf_args --cflags | sed -e "s/'//g"`
370 MYSQL_LIBS=`$MYSQL_CONFIG $mysqlconf_args --libs | sed -e "s/'//g"`
372 mysql_major_version=`$MYSQL_CONFIG $mysql_args --version | \
373 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
374 mysql_minor_version=`$MYSQL_CONFIG $mysql_args --version | \
375 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
376 mysql_micro_version=`$MYSQL_CONFIG $mysql_config_args --version | \
377 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
378 if test "x$enable_mysqltest" = "xyes" ; then
379 ac_save_CFLAGS="$CFLAGS"
381 CFLAGS="$CFLAGS $MYSQL_CFLAGS"
382 LIBS="$LIBS $MYSQL_LIBS"
384 dnl Now check if the installed MYSQL is sufficiently new. (Also sanity
385 dnl checks the results of mysql_config to some extent
395 my_strdup (char *str)
401 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
402 strcpy (new_str, str);
410 int main (int argc, char *argv[])
412 int major, minor, micro;
415 /* This hangs on some systems (?)
416 system ("touch conf.mysqltest");
418 { FILE *fp = fopen("conf.mysqltest", "a"); if ( fp ) fclose(fp); }
420 /* HP/UX 9 (%@#!) writes to sscanf strings */
421 tmp_version = my_strdup("$min_mysql_version");
422 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
423 printf("%s, bad version string\n", "$min_mysql_version");
427 if (($mysql_major_version > major) ||
428 (($mysql_major_version == major) && ($mysql_minor_version > minor)) ||
429 (($mysql_major_version == major) && ($mysql_minor_version == minor) && ($mysql_micro_version >= micro)))
435 printf("\n*** 'mysql_config --version' returned %d.%d.%d, but the minimum version\n", $mysql_major_version, $mysql_minor_version, $mysql_micro_version);
436 printf("*** of MYSQL required is %d.%d.%d. If mysql_config is correct, then it is\n", major, minor, micro);
437 printf("*** best to upgrade to the required version.\n");
438 printf("*** If mysql_config was wrong, set the environment variable MYSQL_CONFIG\n");
439 printf("*** to point to the correct copy of mysql_config, and remove the file\n");
440 printf("*** config.cache before re-running configure\n");
445 ],, no_mysql=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
446 CFLAGS="$ac_save_CFLAGS"
450 if test "x$no_mysql" = x ; then
452 ifelse([$2], , :, [$2])
455 if test "$MYSQL_CONFIG" = "no" ; then
456 echo "*** The mysql_config script installed by MYSQL could not be found"
457 echo "*** If MYSQL was installed in PREFIX, make sure PREFIX/bin is in"
458 echo "*** your path, or set the MYSQL_CONFIG environment variable to the"
459 echo "*** full path to mysql_config."
461 if test -f conf.mysqltest ; then
464 echo "*** Could not run MYSQL test program, checking why..."
465 CFLAGS="$CFLAGS $MYSQL_CFLAGS"
466 LIBS="$LIBS $MYSQL_LIBS"
471 int main(int argc, char *argv[])
474 #define main K_and_R_C_main
476 [ echo "*** The test program compiled, but did not run. This usually means"
477 echo "*** that the run-time linker is not finding MYSQL or finding the wrong"
478 echo "*** version of MYSQL. If it is not finding MYSQL, you'll need to set your"
479 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
480 echo "*** to the installed location Also, make sure you have run ldconfig if that"
481 echo "*** is required on your system"
483 echo "*** If you have an old version installed, it is best to remove it, although"
484 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
485 [ echo "*** The test program failed to compile or link. See the file config.log for the"
486 echo "*** exact error that occured. This usually means MYSQL was incorrectly installed"
487 echo "*** or that you have moved MYSQL since it was installed. In the latter case, you"
488 echo "*** may want to edit the mysql_config script: $MYSQL_CONFIG" ])
489 CFLAGS="$ac_save_CFLAGS"
495 ifelse([$3], , :, [$3])
497 AC_SUBST(MYSQL_CFLAGS)
502 dnl Removes -I/usr/include/? from given variable
503 AC_DEFUN(CFLAGS_REMOVE_USR_INCLUDE,[
507 -I/usr/include|-I/usr/include/) ;;
508 *) ac_new_flags="[$]ac_new_flags [$]i" ;;
514 dnl Removes -L/usr/lib/? from given variable
515 AC_DEFUN(LIB_REMOVE_USR_LIB,[
519 -L/usr/lib|-L/usr/lib/) ;;
520 *) ac_new_flags="[$]ac_new_flags [$]i" ;;
526 dnl From Bruno Haible.
530 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
531 dnl those with the standalone portable libiconv installed).
532 AC_MSG_CHECKING(for iconv in $1)
533 jm_cv_func_iconv="no"
536 AC_TRY_LINK([#include <stdlib.h>
537 #include <giconv.h>],
538 [iconv_t cd = iconv_open("","");
539 iconv(cd,NULL,NULL,NULL,NULL);
544 if test "$jm_cv_func_iconv" != yes; then
545 AC_TRY_LINK([#include <stdlib.h>
547 [iconv_t cd = iconv_open("","");
548 iconv(cd,NULL,NULL,NULL,NULL);
550 jm_cv_func_iconv=yes)
552 if test "$jm_cv_lib_iconv" != yes; then
554 LIBS="$LIBS -lgiconv"
555 AC_TRY_LINK([#include <stdlib.h>
556 #include <giconv.h>],
557 [iconv_t cd = iconv_open("","");
558 iconv(cd,NULL,NULL,NULL,NULL);
565 if test "$jm_cv_func_iconv" != yes; then
568 AC_TRY_LINK([#include <stdlib.h>
570 [iconv_t cd = iconv_open("","");
571 iconv(cd,NULL,NULL,NULL,NULL);
574 jm_cv_func_iconv=yes)
580 if test "$jm_cv_func_iconv" = yes; then
581 if test "$jm_cv_giconv" = yes; then
582 AC_DEFINE(HAVE_GICONV, 1, [What header to include for iconv() function: giconv.h])
586 AC_DEFINE(HAVE_ICONV, 1, [What header to include for iconv() function: iconv.h])
593 if test "$jm_cv_lib_iconv" = yes; then
594 if test "$jm_cv_giconv" = yes; then
595 LIBS="$LIBS -lgiconv"
602 dnl CFLAGS_ADD_DIR(CFLAGS, $INCDIR)
603 dnl This function doesn't add -I/usr/include into CFLAGS
604 AC_DEFUN(CFLAGS_ADD_DIR,[
605 if test "$2" != "/usr/include" ; then
610 dnl LIB_ADD_DIR(LDFLAGS, $LIBDIR)
611 dnl This function doesn't add -L/usr/lib into LDFLAGS
612 AC_DEFUN(LIB_ADD_DIR,[
613 if test "$2" != "/usr/lib" ; then
618 dnl AC_ENABLE_SHARED - implement the --enable-shared flag
619 dnl Usage: AC_ENABLE_SHARED[(DEFAULT)]
620 dnl Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
622 AC_DEFUN([AC_ENABLE_SHARED],
623 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
624 AC_ARG_ENABLE(shared,
625 changequote(<<, >>)dnl
626 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
628 [p=${PACKAGE-default}
630 yes) enable_shared=yes ;;
631 no) enable_shared=no ;;
634 # Look at the argument we got. We use all the common list separators.
635 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
636 for pkg in $enableval; do
637 if test "X$pkg" = "X$p"; then
645 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
648 dnl AC_ENABLE_STATIC - implement the --enable-static flag
649 dnl Usage: AC_ENABLE_STATIC[(DEFAULT)]
650 dnl Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
652 AC_DEFUN([AC_ENABLE_STATIC],
653 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
654 AC_ARG_ENABLE(static,
655 changequote(<<, >>)dnl
656 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
658 [p=${PACKAGE-default}
660 yes) enable_static=yes ;;
661 no) enable_static=no ;;
664 # Look at the argument we got. We use all the common list separators.
665 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
666 for pkg in $enableval; do
667 if test "X$pkg" = "X$p"; then
674 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
677 dnl AC_DISABLE_STATIC - set the default static flag to --disable-static
678 AC_DEFUN([AC_DISABLE_STATIC],
679 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
680 AC_ENABLE_STATIC(no)])