1dnl -*- buffer-read-only: t -*- vi: set ro: 2dnl 3dnl DO NOT EDIT THIS FILE (libopts.m4) 4dnl 5dnl It has been AutoGen-ed November 8, 2009 at 08:41:10 AM by AutoGen 5.9.10pre13 6dnl From the definitions libopts.def 7dnl and the template file conftest.tpl 8dnl 9dnl do always before generated macros: 10dnl 11AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[ 12[if test X${INVOKE_LIBOPTS_MACROS_FIRST_done} != Xyes ; then] 13 AC_HEADER_STDC 14 AC_HEADER_DIRENT 15 16 # ================= 17 # AC_CHECK_HEADERS 18 # ================= 19 AC_CHECK_HEADERS(dlfcn.h errno.h fcntl.h libgen.h memory.h netinet/in.h \ 20 setjmp.h sys/mman.h sys/param.h sys/poll.h sys/procset.h sys/select.h \ 21 sys/socket.h sys/stropts.h sys/time.h sys/un.h sys/wait.h unistd.h \ 22 utime.h sysexits.h) 23 24 # -------------------------------------------- 25 # Verify certain entries from AC_CHECK_HEADERS 26 # -------------------------------------------- 27 [for f in sys_types sys_mman sys_param sys_stat sys_wait \ 28 string errno stdlib memory setjmp 29 do eval as_ac_var=\${ac_cv_header_${f}_h+set} 30 test "${as_ac_var}" = set] || \ 31 AC_MSG_ERROR([You must have ${f}.h on your system]) 32 done 33 34 # ================================================ 35 # AC_CHECK_HEADERS: stdarg.h is present define HAVE_STDARG_H, otherwise 36 # if varargs.h is present define HAVE_VARARGS_H. 37 # ================================================ 38 AC_CHECK_HEADERS(stdarg.h varargs.h, break) 39 [if test `eval echo '${'$as_ac_Header'}'` != yes; then] 40 AC_MSG_ERROR([You must have stdarg.h or varargs.h on your system]) 41 fi 42 43 # ================================================ 44 # Similarly for the string.h and strings.h headers 45 # ================================================ 46 AC_CHECK_HEADERS(string.h strings.h, break) 47 [if test `eval echo '${'$as_ac_Header'}'` != yes; then] 48 AC_MSG_ERROR([You must have string.h or strings.h on your system]) 49 fi 50 51 # ===================== 52 # ...and limits headers 53 # ===================== 54 AC_CHECK_HEADERS(limits.h sys/limits.h values.h, break) 55 [if test `eval echo '${'$as_ac_Header'}'` != yes; then] 56 AC_MSG_ERROR([You must have one of limits.h, sys/limits.h or values.h]) 57 fi 58 59 # ---------------------------------------------------------------------- 60 # check for various programs used during the build. 61 # On OS/X, "wchar.h" needs "runetype.h" to work properly. 62 # ---------------------------------------------------------------------- 63 AC_CHECK_HEADERS([runetype.h wchar.h], [], [],[ 64 AC_INCLUDES_DEFAULT 65 #if HAVE_RUNETYPE_H 66 # include <runetype.h> 67 #endif 68 ]) 69 70 # ---------------------------------------------------------------------- 71 # Checks for typedefs 72 # ---------------------------------------------------------------------- 73 AC_CHECK_TYPES(wchar_t) 74 AC_CHECK_TYPES(wint_t, [], [], [ 75 AC_INCLUDES_DEFAULT 76 #if HAVE_RUNETYPE_H 77 # include <runetype.h> 78 #endif 79 #if HAVE_WCHAR_H 80 # include <wchar.h> 81 #endif 82 ]) 83 84 # ======================== 85 # ...and int types headers 86 # ======================== 87 AC_CHECK_HEADERS(stdint.h inttypes.h, break) 88 AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, 89 intptr_t, uintptr_t, uint_t, pid_t, size_t]) 90 91 # ===== 92 # sizes 93 # ===== 94 AC_CHECK_SIZEOF(char*, 4) 95 AC_CHECK_SIZEOF(int, 4) 96 AC_CHECK_SIZEOF(long, 4) 97 AC_CHECK_SIZEOF(short, 2) 98 99 # ---------------------------------------------------------------------- 100 # AC_CHECK_LIB for SVR4 libgen, and use it if it defines pathfind. 101 # ---------------------------------------------------------------------- 102 AC_CHECK_LIB(gen, pathfind) 103 AC_FUNC_VPRINTF 104 AC_FUNC_FORK 105 AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \ 106 strrchr strsignal]) 107[ INVOKE_LIBOPTS_MACROS_FIRST_done=yes 108fi]]) 109 110dnl 111dnl @synopsis INVOKE_LIBOPTS_MACROS 112dnl 113dnl This macro will invoke the AutoConf macros specified in libopts.def 114dnl that have not been disabled with "omit-invocation". 115dnl 116AC_DEFUN([LIBOPTS_WITH_REGEX_HEADER],[ 117 AC_ARG_WITH([regex-header], 118 AC_HELP_STRING([--with-regex-header], [a reg expr header is specified]), 119 [libopts_cv_with_regex_header=${with_regex_header}], 120 AC_CACHE_CHECK([whether a reg expr header is specified], libopts_cv_with_regex_header, 121 libopts_cv_with_regex_header=no) 122 ) # end of AC_ARG_WITH 123 124 if test "X${libopts_cv_with_regex_header}" != Xno 125 then 126 AC_DEFINE_UNQUOTED([REGEX_HEADER],[<${libopts_cv_with_regex_header}>]) 127 else 128 AC_DEFINE([REGEX_HEADER],[<regex.h>],[name of regex header file]) 129 fi 130 131]) # end of AC_DEFUN of LIBOPTS_WITH_REGEX_HEADER 132 133 134AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[ 135 AC_ARG_WITH([libregex], 136 AC_HELP_STRING([--with-libregex], [libregex installation prefix]), 137 [libopts_cv_with_libregex_root=${with_libregex}], 138 AC_CACHE_CHECK([whether with-libregex was specified], libopts_cv_with_libregex_root, 139 libopts_cv_with_libregex_root=no) 140 ) # end of AC_ARG_WITH libregex 141 142 if test "${with_libguile+set}" = set && \ 143 test "${withval}" = no 144 then ## disabled by request 145 libopts_cv_with_libregex_root=no 146 libopts_cv_with_libregex_cflags=no 147 libopts_cv_with_libregex_libs=no 148 else 149 150 AC_ARG_WITH([libregex-cflags], 151 AC_HELP_STRING([--with-libregex-cflags], [libregex compile flags]), 152 [libopts_cv_with_libregex_cflags=${with_regex_cflags}], 153 AC_CACHE_CHECK([whether with-libregex-cflags was specified], libopts_cv_with_libregex_cflags, 154 libopts_cv_with_libregex_cflags=no) 155 ) # end of AC_ARG_WITH libregex-cflags 156 157 AC_ARG_WITH([libregex-libs], 158 AC_HELP_STRING([--with-libregex-libs], [libregex link command arguments]), 159 [libopts_cv_with_libregex_libs=${with_regex_libs}], 160 AC_CACHE_CHECK([whether with-libregex-libs was specified], libopts_cv_with_libregex_libs, 161 libopts_cv_with_libregex_libs=no) 162 ) # end of AC_ARG_WITH libregex-libs 163 164 case "X${libopts_cv_with_libregex_cflags}" in 165 Xyes|Xno|X ) 166 case "X${libopts_cv_with_libregex_root}" in 167 Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;; 168 * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;; 169 esac 170 esac 171 case "X${libopts_cv_with_libregex_libs}" in 172 Xyes|Xno|X ) 173 case "X${libopts_cv_with_libregex_root}" in 174 Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;; 175 * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex";; 176 esac 177 esac 178 libopts_save_CPPFLAGS="${CPPFLAGS}" 179 libopts_save_LIBS="${LIBS}" 180 fi ## disabled by request 181 182 case "X${libopts_cv_with_libregex_cflags}" in 183 Xyes|Xno|X ) 184 libopts_cv_with_libregex_cflags="" ;; 185 * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;; 186 esac 187 case "X${libopts_cv_with_libregex_libs}" in 188 Xyes|Xno|X ) 189 libopts_cv_with_libregex_libs="" ;; 190 * ) 191 LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;; 192 esac 193 LIBREGEX_CFLAGS="" 194 LIBREGEX_LIBS="" 195 AC_MSG_CHECKING([whether libregex functions properly]) 196 AC_CACHE_VAL([libopts_cv_with_libregex],[ 197 AC_TRY_RUN([@%:@include <stdio.h> 198@%:@include <stdlib.h> 199@%:@include <sys/types.h> 200@%:@include REGEX_HEADER 201static regex_t re; 202void comp_re( char const* pzPat ) { 203 int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE ); 204 if (res == 0) return; 205 exit( res ); } 206int main() { 207 regmatch_t m@<:@2@:>@; 208 comp_re( "^.*\@S|@" ); 209 comp_re( "()|no.*" ); 210 comp_re( "." ); 211 if (regexec( &re, "X", 2, m, 0 ) != 0) return 1; 212 if ((m@<:@0@:>@.rm_so != 0) || (m@<:@0@:>@.rm_eo != 1)) { 213 fputs( "error: regex -->.<-- did not match\n", stderr ); 214 return 1; 215 } 216 return 0; }], 217 [libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no], 218 [libopts_cv_with_libregex=no]) # end of AC_TRY_RUN 219 ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex 220 AC_MSG_RESULT([${libopts_cv_with_libregex}]) 221 222 if test "X${libopts_cv_with_libregex}" != Xno 223 then 224 AC_DEFINE([WITH_LIBREGEX],[1], 225 [Define this if a working libregex can be found]) 226 else 227 CPPFLAGS="${libopts_save_CPPFLAGS}" 228 LIBS="${libopts_save_LIBS}" 229 fi 230 231]) # end of AC_DEFUN of LIBOPTS_WITHLIB_REGEX 232 233 234AC_DEFUN([LIBOPTS_RUN_PATHFIND],[ 235 AC_MSG_CHECKING([whether pathfind(3) works]) 236 AC_CACHE_VAL([libopts_cv_run_pathfind],[ 237 AC_TRY_RUN([@%:@include <string.h> 238@%:@include <stdlib.h> 239int main (int argc, char** argv) { 240 char* pz = pathfind( getenv( "PATH" ), "sh", "x" ); 241 return (pz == 0) ? 1 : 0; 242}], 243 [libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no] 244 ) # end of TRY_RUN 245 ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind 246 AC_MSG_RESULT([${libopts_cv_run_pathfind}]) 247 248 if test "X${libopts_cv_run_pathfind}" != Xno 249 then 250 AC_DEFINE([HAVE_PATHFIND],[1], 251 [Define this if pathfind(3) works]) 252 fi 253 254]) # end of AC_DEFUN of LIBOPTS_RUN_PATHFIND 255 256 257AC_DEFUN([LIBOPTS_TEST_DEV_ZERO],[ 258 AC_MSG_CHECKING([whether /dev/zero is readable device]) 259 AC_CACHE_VAL([libopts_cv_test_dev_zero],[ 260 libopts_cv_test_dev_zero=`exec 2> /dev/null 261dzero=\`ls -lL /dev/zero | egrep ^c......r\` 262test -z "${dzero}" && exit 1 263echo ${dzero}` 264 if test $? -ne 0 265 then libopts_cv_test_dev_zero=no 266 elif test -z "$libopts_cv_test_dev_zero" 267 then libopts_cv_test_dev_zero=no 268 fi 269 ]) # end of CACHE_VAL of libopts_cv_test_dev_zero 270 AC_MSG_RESULT([${libopts_cv_test_dev_zero}]) 271 272 if test "X${libopts_cv_test_dev_zero}" != Xno 273 then 274 AC_DEFINE([HAVE_DEV_ZERO],[1], 275 [Define this if /dev/zero is readable device]) 276 fi 277 278]) # end of AC_DEFUN of LIBOPTS_TEST_DEV_ZERO 279 280 281AC_DEFUN([LIBOPTS_RUN_REALPATH],[ 282 AC_MSG_CHECKING([whether we have a functional realpath(3C)]) 283 AC_CACHE_VAL([libopts_cv_run_realpath],[ 284 AC_TRY_RUN([@%:@include <limits.h> 285@%:@include <stdlib.h> 286int main (int argc, char** argv) { 287@%:@ifndef PATH_MAX 288choke me!! 289@%:@else 290 char zPath@<:@PATH_MAX+1@:>@; 291@%:@endif 292 char *pz = realpath(argv@<:@0@:>@, zPath); 293 return (pz == zPath) ? 0 : 1; 294}], 295 [libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no] 296 ) # end of TRY_RUN 297 ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath 298 AC_MSG_RESULT([${libopts_cv_run_realpath}]) 299 300 if test "X${libopts_cv_run_realpath}" != Xno 301 then 302 AC_DEFINE([HAVE_REALPATH],[1], 303 [Define this if we have a functional realpath(3C)]) 304 fi 305 306]) # end of AC_DEFUN of LIBOPTS_RUN_REALPATH 307 308 309AC_DEFUN([LIBOPTS_RUN_STRFTIME],[ 310 AC_MSG_CHECKING([whether strftime() works]) 311 AC_CACHE_VAL([libopts_cv_run_strftime],[ 312 AC_TRY_RUN([@%:@include <time.h> 313@%:@include <string.h> 314char t_buf@<:@ 64 @:>@; 315int main() { 316 static char const z@<:@@:>@ = "Thursday Aug 28 240"; 317 struct tm tm; 318 tm.tm_sec = 36; /* seconds after the minute @<:@0, 61@:>@ */ 319 tm.tm_min = 44; /* minutes after the hour @<:@0, 59@:>@ */ 320 tm.tm_hour = 12; /* hour since midnight @<:@0, 23@:>@ */ 321 tm.tm_mday = 28; /* day of the month @<:@1, 31@:>@ */ 322 tm.tm_mon = 7; /* months since January @<:@0, 11@:>@ */ 323 tm.tm_year = 86; /* years since 1900 */ 324 tm.tm_wday = 4; /* days since Sunday @<:@0, 6@:>@ */ 325 tm.tm_yday = 239; /* days since January 1 @<:@0, 365@:>@ */ 326 tm.tm_isdst = 1; /* flag for daylight savings time */ 327 strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm ); 328 return (strcmp( t_buf, z ) != 0); }], 329 [libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no] 330 ) # end of TRY_RUN 331 ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime 332 AC_MSG_RESULT([${libopts_cv_run_strftime}]) 333 334 if test "X${libopts_cv_run_strftime}" != Xno 335 then 336 AC_DEFINE([HAVE_STRFTIME],[1], 337 [Define this if strftime() works]) 338 fi 339 340]) # end of AC_DEFUN of LIBOPTS_RUN_STRFTIME 341 342 343AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[ 344 AC_MSG_CHECKING([whether fopen accepts "b" mode]) 345 AC_CACHE_VAL([libopts_cv_run_fopen_binary],[ 346 AC_TRY_RUN([@%:@include <stdio.h> 347int main (int argc, char** argv) { 348FILE* fp = fopen("conftest.@S|@ac_ext", "rb"); 349return (fp == NULL) ? 1 : fclose(fp); }], 350 [libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no] 351 ) # end of TRY_RUN 352 ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary 353 AC_MSG_RESULT([${libopts_cv_run_fopen_binary}]) 354 355 if test "X${libopts_cv_run_fopen_binary}" != Xno 356 then 357 AC_DEFINE([FOPEN_BINARY_FLAG],"b", 358 [fopen(3) accepts a 'b' in the mode flag]) 359 else 360 AC_DEFINE([FOPEN_BINARY_FLAG],"", 361 [fopen(3) accepts a 'b' in the mode flag]) 362 fi 363 364]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_BINARY 365 366 367AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[ 368 AC_MSG_CHECKING([whether fopen accepts "t" mode]) 369 AC_CACHE_VAL([libopts_cv_run_fopen_text],[ 370 AC_TRY_RUN([@%:@include <stdio.h> 371int main (int argc, char** argv) { 372FILE* fp = fopen("conftest.@S|@ac_ext", "rt"); 373return (fp == NULL) ? 1 : fclose(fp); }], 374 [libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no] 375 ) # end of TRY_RUN 376 ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text 377 AC_MSG_RESULT([${libopts_cv_run_fopen_text}]) 378 379 if test "X${libopts_cv_run_fopen_text}" != Xno 380 then 381 AC_DEFINE([FOPEN_TEXT_FLAG],"t", 382 [fopen(3) accepts a 't' in the mode flag]) 383 else 384 AC_DEFINE([FOPEN_TEXT_FLAG],"", 385 [fopen(3) accepts a 't' in the mode flag]) 386 fi 387 388]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_TEXT 389 390 391AC_DEFUN([LIBOPTS_DISABLE_OPTIONAL_ARGS],[ 392 AC_ARG_ENABLE([optional-args], 393 AC_HELP_STRING([--disable-optional-args], [not wanting optional option args]), 394 [libopts_cv_enable_optional_args=${enable_optional_args}], 395 AC_CACHE_CHECK([whether not wanting optional option args], libopts_cv_enable_optional_args, 396 libopts_cv_enable_optional_args=yes) 397 ) # end of AC_ARG_ENABLE 398 399 if test "X${libopts_cv_enable_optional_args}" = Xno 400 then 401 AC_DEFINE([NO_OPTIONAL_OPT_ARGS], [1], 402 [Define this if optional arguments are disallowed]) 403 fi 404 405]) # end of AC_DEFUN of LIBOPTS_DISABLE_OPTIONAL_ARGS 406 407 408AC_DEFUN([INVOKE_LIBOPTS_MACROS],[ 409 INVOKE_LIBOPTS_MACROS_FIRST 410 # Check to see if a reg expr header is specified. 411 LIBOPTS_WITH_REGEX_HEADER 412 413 # Check to see if a working libregex can be found. 414 LIBOPTS_WITHLIB_REGEX 415 416 # Check to see if pathfind(3) works. 417 LIBOPTS_RUN_PATHFIND 418 419 # Check to see if /dev/zero is readable device. 420 LIBOPTS_TEST_DEV_ZERO 421 422 # Check to see if we have a functional realpath(3C). 423 LIBOPTS_RUN_REALPATH 424 425 # Check to see if strftime() works. 426 LIBOPTS_RUN_STRFTIME 427 428 # Check to see if fopen accepts "b" mode. 429 LIBOPTS_RUN_FOPEN_BINARY 430 431 # Check to see if fopen accepts "t" mode. 432 LIBOPTS_RUN_FOPEN_TEXT 433 434 # Check to see if not wanting optional option args. 435 LIBOPTS_DISABLE_OPTIONAL_ARGS 436 437]) # end AC_DEFUN of INVOKE_LIBOPTS_MACROS 438 439dnl @synopsis LIBOPTS_CHECK 440dnl 441dnl Time-stamp: "2009-07-22 18:50:49 bkorb" 442dnl 443dnl If autoopts-config works, add the linking information to LIBS. 444dnl Otherwise, add ``libopts-${ao_rev}'' to SUBDIRS and run all 445dnl the config tests that the library needs. Invoke the 446dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts. 447dnl 448dnl This file is part of AutoGen. 449dnl AutoGen copyright (c) 1992-2009 by Bruce Korb - all rights reserved 450dnl 451dnl AutoGen is free software: you can redistribute it and/or modify it 452dnl under the terms of the GNU General Public License as published by the 453dnl Free Software Foundation, either version 3 of the License, or 454dnl (at your option) any later version. 455dnl 456dnl AutoGen is distributed in the hope that it will be useful, but 457dnl WITHOUT ANY WARRANTY; without even the implied warranty of 458dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 459dnl See the GNU General Public License for more details. 460dnl 461dnl You should have received a copy of the GNU General Public License along 462dnl with this program. If not, see <http://www.gnu.org/licenses/>. 463dnl 464dnl Default to system libopts 465dnl 466AC_DEFUN([LIBOPTS_CHECK],[ 467 [NEED_LIBOPTS_DIR=''] 468 m4_pushdef([AO_Libopts_Dir], 469 [ifelse($1, , [libopts], [$1])]) 470 AC_SUBST(LIBOPTS_DIR, AO_Libopts_Dir) 471 AC_ARG_ENABLE([local-libopts], 472 AC_HELP_STRING([--enable-local-libopts], 473 [Force using the supplied libopts tearoff code]),[ 474 if test x$enableval = xyes ; then 475 AC_MSG_NOTICE([Using supplied libopts tearoff]) 476 LIBOPTS_LDADD='$(top_builddir)/AO_Libopts_Dir/libopts.la' 477 LIBOPTS_CFLAGS='-I$(top_srcdir)/AO_Libopts_Dir' 478 NEED_LIBOPTS_DIR=true 479 fi]) 480 481 AC_ARG_ENABLE([libopts-install], 482 AC_HELP_STRING([--disable-libopts-install], 483 [Do not install libopts with client installation])) 484 AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" != Xno]) 485 486 [if test -z "${NEED_LIBOPTS_DIR}" ; then] 487 AC_MSG_CHECKING([whether autoopts-config can be found]) 488 AC_ARG_WITH([autoopts-config], 489 AC_HELP_STRING([--with-autoopts-config], 490 [specify the config-info script]), 491 [lo_cv_with_autoopts_config=${with_autoopts_config}], 492 AC_CACHE_CHECK([whether autoopts-config is specified], 493 [lo_cv_with_autoopts_config], 494 [if autoopts-config --help 2>/dev/null 1>&2 495 then lo_cv_with_autoopts_config=autoopts-config 496 elif libopts-config --help 2>/dev/null 1>&2 497 then lo_cv_with_autoopts_config=libopts-config 498 else lo_cv_with_autoopts_config=no ; fi]) 499 ) # end of AC_ARG_WITH 500 501 AC_CACHE_VAL([lo_cv_test_autoopts],[ 502 if test -z "${lo_cv_with_autoopts_config}" \ 503 -o X"${lo_cv_with_autoopts_config}" = Xno 504 then 505 if autoopts-config --help 2>/dev/null 1>&2 506 then lo_cv_with_autoopts_config=autoopts-config 507 elif libopts-config --help 2>/dev/null 1>&2 508 then lo_cv_with_autoopts_config=libopts-config 509 else lo_cv_with_autoopts_config=false ; fi 510 fi 511 lo_cv_test_autoopts=` 512 ${lo_cv_with_autoopts_config} --libs` 2> /dev/null 513 if test $? -ne 0 -o -z "${lo_cv_test_autoopts}" 514 then lo_cv_test_autoopts=no ; fi 515 ]) # end of CACHE_VAL 516 AC_MSG_RESULT([${lo_cv_test_autoopts}]) 517 518 [if test "X${lo_cv_test_autoopts}" != Xno 519 then 520 LIBOPTS_LDADD="${lo_cv_test_autoopts}" 521 LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`" 522 else 523 LIBOPTS_LDADD='$(top_builddir)/]AO_Libopts_Dir[/libopts.la' 524 LIBOPTS_CFLAGS='-I$(top_srcdir)/]AO_Libopts_Dir[' 525 NEED_LIBOPTS_DIR=true 526 fi 527 fi # end of if test -z "${NEED_LIBOPTS_DIR}"] 528 529 AM_CONDITIONAL([NEED_LIBOPTS], [test -n "${NEED_LIBOPTS_DIR}"]) 530 AC_SUBST(LIBOPTS_LDADD) 531 AC_SUBST(LIBOPTS_CFLAGS) 532 AC_SUBST(LIBOPTS_DIR, AO_Libopts_Dir) 533 AC_CONFIG_FILES(AO_Libopts_Dir/Makefile) 534 m4_popdef([AO_Libopts_Dir]) 535 536 [if test -n "${NEED_LIBOPTS_DIR}" ; then] 537 INVOKE_LIBOPTS_MACROS 538 else 539 INVOKE_LIBOPTS_MACROS_FIRST 540 [fi 541# end of AC_DEFUN of LIBOPTS_CHECK] 542]) 543