1 dnl -*- buffer-read-only: t -*- vi: set ro:
3 dnl DO NOT EDIT THIS FILE (libopts.m4)
5 dnl It has been AutoGen-ed
6 dnl From the definitions libopts.def
7 dnl and the template file conftest.tpl
9 dnl do always before generated macros:
11 AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
12 AC_REQUIRE([AC_HEADER_STDC])
19 sys/mman.h sys/param.h sys/poll.h sys/procset.h \
20 sys/select.h sys/socket.h sys/stropts.h sys/time.h \
21 sys/un.h sys/wait.h dlfcn.h errno.h \
22 fcntl.h libgen.h libintl.h memory.h \
23 netinet/in.h setjmp.h stdbool.h sysexits.h \
26 AC_CHECK_HEADERS([stdarg.h varargs.h],
27 [lo_have_arg_hdr=true;break],
28 [lo_have_arg_hdr=false])
30 AC_CHECK_HEADERS([string.h strings.h],
31 [lo_have_str_hdr=true;break],
32 [lo_have_str_hdr=false])
34 AC_CHECK_HEADERS([limits.h sys/limits.h values.h],
35 [lo_have_lim_hdr=true;break],
36 [lo_have_lim_hdr=false])
38 AC_CHECK_HEADERS([inttypes.h stdint.h],
39 [lo_have_typ_hdr=true;break],
40 [lo_have_typ_hdr=false])
43 # ----------------------------------------------------------------------
44 # check for various programs used during the build.
45 # On OS/X, "wchar.h" needs "runetype.h" to work properly.
46 # ----------------------------------------------------------------------
47 AC_CHECK_HEADERS([runetype.h wchar.h], [], [],[
50 # include <runetype.h>
55 AS_HELP_STRING([--disable-nls],[disable nls support in libopts]))
56 AS_IF([test "x$enable_nls" != "xno" && \
57 test "X${ac_cv_header_libintl_h}" = Xyes], [
58 AC_DEFINE([ENABLE_NLS],[1],[nls support in libopts])])
60 # --------------------------------------------
61 # Verify certain entries from AC_CHECK_HEADERS
62 # --------------------------------------------
63 [${lo_have_arg_hdr} || \
64 ]AC_MSG_ERROR([you must have stdarg.h or varargs.h on your system])[
66 ${lo_have_str_hdr} || \
67 ]AC_MSG_ERROR([you must have string.h or strings.h on your system])[
69 ${lo_have_lim_hdr} || \
71 [you must have one of limits.h, sys/limits.h or values.h])[
73 ${lo_have_typ_hdr} || \
74 ]AC_MSG_ERROR([you must have inttypes.h or stdint.h on your system])[
76 for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
77 do eval as_ac_var=\${ac_cv_header_${f}_h}
78 test "X${as_ac_var}" = Xyes || {
79 ]AC_MSG_ERROR([you must have ${f}.h on your system])[
82 test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
83 echo '#include <stdint.h>' > inttypes.h]
85 # ----------------------------------------------------------------------
87 # ----------------------------------------------------------------------
88 AC_CHECK_TYPES(wchar_t)
89 AC_CHECK_TYPES(wint_t, [], [], [
92 # include <runetype.h>
98 AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t,
99 intptr_t, uintptr_t, uint_t, pid_t, size_t, ptrdiff_t])
100 AC_CHECK_SIZEOF(char *, 8)
101 AC_CHECK_SIZEOF(int, 4)
102 AC_CHECK_SIZEOF(long, 8)
103 AC_CHECK_SIZEOF(short, 2)
108 AC_CHECK_LIB(gen, pathfind)
109 AC_CHECK_LIB(intl,gettext)
112 AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
113 strrchr strsignal fchmod fstat chmod])
117 POSIX_SHELL=`which bash`
118 test -x "$POSIX_SHELL" && break
119 POSIX_SHELL=`which dash`
120 test -x "$POSIX_SHELL" && break
121 POSIX_SHELL=/usr/xpg4/bin/sh
122 test -x "$POSIX_SHELL" && break
123 POSIX_SHELL=`/bin/sh -c '
125 if ! true ; then exit 1 ; fi
127 test -x "$POSIX_SHELL" && break
128 ]AC_MSG_ERROR([cannot locate a working POSIX shell])[
130 AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"],
131 [define to a working POSIX compliant shell])
132 AC_SUBST([POSIX_SHELL])
136 dnl @synopsis INVOKE_LIBOPTS_MACROS
138 dnl This macro will invoke the AutoConf macros specified in libopts.def
139 dnl that have not been disabled with "omit-invocation".
141 AC_DEFUN([LIBOPTS_WITH_REGEX_HEADER],[
142 AC_ARG_WITH([regex-header],
143 AS_HELP_STRING([--with-regex-header], [a reg expr header is specified]),
144 [libopts_cv_with_regex_header=${with_regex_header}],
145 AC_CACHE_CHECK([whether a reg expr header is specified], libopts_cv_with_regex_header,
146 libopts_cv_with_regex_header=no)
147 ) # end of AC_ARG_WITH
148 if test "X${libopts_cv_with_regex_header}" != Xno
150 AC_DEFINE_UNQUOTED([REGEX_HEADER],[<${libopts_cv_with_regex_header}>])
152 AC_DEFINE([REGEX_HEADER],[<regex.h>],[name of regex header file])
155 ]) # end of AC_DEFUN of LIBOPTS_WITH_REGEX_HEADER
158 AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
159 AC_ARG_WITH([libregex],
160 AS_HELP_STRING([--with-libregex], [libregex installation prefix]),
161 [libopts_cv_with_libregex_root=${with_libregex}],
162 AC_CACHE_CHECK([whether with-libregex was specified], libopts_cv_with_libregex_root,
163 libopts_cv_with_libregex_root=no)
164 ) # end of AC_ARG_WITH libregex
166 if test "${with_libregex+set}" = set && \
167 test "X${withval}" = Xno
168 then ## disabled by request
169 libopts_cv_with_libregex_root=no
170 libopts_cv_with_libregex_cflags=no
171 libopts_cv_with_libregex_libs=no
174 AC_ARG_WITH([libregex-cflags],
175 AS_HELP_STRING([--with-libregex-cflags], [libregex compile flags]),
176 [libopts_cv_with_libregex_cflags=${with_libregex_cflags}],
177 AC_CACHE_CHECK([whether with-libregex-cflags was specified], libopts_cv_with_libregex_cflags,
178 libopts_cv_with_libregex_cflags=no)
179 ) # end of AC_ARG_WITH libregex-cflags
181 AC_ARG_WITH([libregex-libs],
182 AS_HELP_STRING([--with-libregex-libs], [libregex link command arguments]),
183 [libopts_cv_with_libregex_libs=${with_libregex_libs}],
184 AC_CACHE_CHECK([whether with-libregex-libs was specified], libopts_cv_with_libregex_libs,
185 libopts_cv_with_libregex_libs=no)
186 ) # end of AC_ARG_WITH libregex-libs
188 case "X${libopts_cv_with_libregex_cflags}" in
190 case "X${libopts_cv_with_libregex_root}" in
191 Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
192 * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
195 case "X${libopts_cv_with_libregex_libs}" in
197 case "X${libopts_cv_with_libregex_root}" in
198 Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
199 * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
202 libopts_save_CPPFLAGS="${CPPFLAGS}"
203 libopts_save_LIBS="${LIBS}"
204 case "X${libopts_cv_with_libregex_cflags}" in
206 libopts_cv_with_libregex_cflags="" ;;
207 * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
209 case "X${libopts_cv_with_libregex_libs}" in
211 libopts_cv_with_libregex_libs="" ;;
213 LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
217 AC_MSG_CHECKING([whether libregex functions properly])
218 AC_CACHE_VAL([libopts_cv_with_libregex],[
219 AC_RUN_IFELSE([@%:@include <stdio.h>
220 @%:@include <stdlib.h>
221 @%:@include <sys/types.h>
222 @%:@include REGEX_HEADER
224 void comp_re(char const * pzPat) {
225 int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
226 if (res == 0) return;
229 regmatch_t m@<:@2@:>@;
230 comp_re( "^.*\@S|@" );
231 comp_re( "()|no.*" );
233 if (regexec( &re, "X", 2, m, 0 ) != 0) return 1;
234 if ((m@<:@0@:>@.rm_so != 0) || (m@<:@0@:>@.rm_eo != 1)) {
235 fputs( "error: regex -->.<-- did not match\n", stderr );
239 [libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
240 [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
241 ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
242 fi ## disabled by request
243 AC_MSG_RESULT([${libopts_cv_with_libregex}])
244 if test "X${libopts_cv_with_libregex}" != Xno
246 AC_DEFINE([WITH_LIBREGEX],[1],
247 [Define this if a working libregex can be found])
249 CPPFLAGS="${libopts_save_CPPFLAGS}"
250 LIBS="${libopts_save_LIBS}"
251 libopts_cv_with_libregex_root=no
252 libopts_cv_with_libregex_cflags=no
253 libopts_cv_with_libregex_libs=no
254 libopts_cv_with_libregex=no
257 ]) # end of AC_DEFUN of LIBOPTS_WITHLIB_REGEX
260 AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
261 AC_MSG_CHECKING([whether pathfind(3) works])
262 AC_CACHE_VAL([libopts_cv_run_pathfind],[
263 AC_RUN_IFELSE([@%:@include <string.h>
264 @%:@include <stdlib.h>
265 int main (int argc, char ** argv) {
266 char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
267 return (pz == 0) ? 1 : 0;
269 [libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
270 ) # end of RUN_IFELSE
271 ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
272 AC_MSG_RESULT([${libopts_cv_run_pathfind}])
273 if test "X${libopts_cv_run_pathfind}" != Xno
275 AC_DEFINE([HAVE_PATHFIND],[1],
276 [Define this if pathfind(3) works])
279 ]) # end of AC_DEFUN of LIBOPTS_RUN_PATHFIND
282 AC_DEFUN([LIBOPTS_TEST_DEV_ZERO],[
283 AC_MSG_CHECKING([whether /dev/zero is readable device])
284 AC_CACHE_VAL([libopts_cv_test_dev_zero],[
285 libopts_cv_test_dev_zero=`exec 2> /dev/null
286 dzero=\`ls -lL /dev/zero | egrep ^c......r\`
287 test -z "${dzero}" && exit 1
289 if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
290 then libopts_cv_test_dev_zero=no
292 ]) # end of CACHE_VAL of libopts_cv_test_dev_zero
293 AC_MSG_RESULT([${libopts_cv_test_dev_zero}])
294 if test "X${libopts_cv_test_dev_zero}" != Xno
296 AC_DEFINE([HAVE_DEV_ZERO],[1],
297 [Define this if /dev/zero is readable device])
300 ]) # end of AC_DEFUN of LIBOPTS_TEST_DEV_ZERO
303 AC_DEFUN([LIBOPTS_RUN_REALPATH],[
304 AC_MSG_CHECKING([whether we have a functional realpath(3C)])
305 AC_CACHE_VAL([libopts_cv_run_realpath],[
306 AC_RUN_IFELSE([@%:@include <limits.h>
307 @%:@include <stdlib.h>
308 int main (int argc, char ** argv) {
312 char zPath@<:@PATH_MAX+1@:>@;
314 char *pz = realpath(argv@<:@0@:>@, zPath);
315 return (pz == zPath) ? 0 : 1;
317 [libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
318 ) # end of RUN_IFELSE
319 ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
320 AC_MSG_RESULT([${libopts_cv_run_realpath}])
321 if test "X${libopts_cv_run_realpath}" != Xno
323 AC_DEFINE([HAVE_REALPATH],[1],
324 [Define this if we have a functional realpath(3C)])
327 ]) # end of AC_DEFUN of LIBOPTS_RUN_REALPATH
330 AC_DEFUN([LIBOPTS_RUN_STRFTIME],[
331 AC_MSG_CHECKING([whether strftime() works])
332 AC_CACHE_VAL([libopts_cv_run_strftime],[
333 AC_RUN_IFELSE([@%:@include <time.h>
334 @%:@include <string.h>
335 char t_buf@<:@ 64 @:>@;
337 static char const z@<:@@:>@ = "Thursday Aug 28 240";
339 tm.tm_sec = 36; /* seconds after the minute @<:@0, 61@:>@ */
340 tm.tm_min = 44; /* minutes after the hour @<:@0, 59@:>@ */
341 tm.tm_hour = 12; /* hour since midnight @<:@0, 23@:>@ */
342 tm.tm_mday = 28; /* day of the month @<:@1, 31@:>@ */
343 tm.tm_mon = 7; /* months since January @<:@0, 11@:>@ */
344 tm.tm_year = 86; /* years since 1900 */
345 tm.tm_wday = 4; /* days since Sunday @<:@0, 6@:>@ */
346 tm.tm_yday = 239; /* days since January 1 @<:@0, 365@:>@ */
347 tm.tm_isdst = 1; /* flag for daylight savings time */
348 strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
349 return (strcmp( t_buf, z ) != 0); }],
350 [libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
351 ) # end of RUN_IFELSE
352 ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
353 AC_MSG_RESULT([${libopts_cv_run_strftime}])
354 if test "X${libopts_cv_run_strftime}" != Xno
356 AC_DEFINE([HAVE_STRFTIME],[1],
357 [Define this if strftime() works])
360 ]) # end of AC_DEFUN of LIBOPTS_RUN_STRFTIME
363 AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
364 AC_MSG_CHECKING([whether fopen accepts "b" mode])
365 AC_CACHE_VAL([libopts_cv_run_fopen_binary],[
366 AC_RUN_IFELSE([@%:@include <stdio.h>
367 int main (int argc, char ** argv) {
368 FILE * fp = fopen("conftest.@S|@ac_ext", "rb");
369 return (fp == NULL) ? 1 : fclose(fp); }],
370 [libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
371 ) # end of RUN_IFELSE
372 ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
373 AC_MSG_RESULT([${libopts_cv_run_fopen_binary}])
374 if test "X${libopts_cv_run_fopen_binary}" != Xno
376 AC_DEFINE([FOPEN_BINARY_FLAG],"b",
377 [fopen(3) accepts a 'b' in the mode flag])
379 AC_DEFINE([FOPEN_BINARY_FLAG],"",
380 [fopen(3) accepts a 'b' in the mode flag])
383 ]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_BINARY
386 AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
387 AC_MSG_CHECKING([whether fopen accepts "t" mode])
388 AC_CACHE_VAL([libopts_cv_run_fopen_text],[
389 AC_RUN_IFELSE([@%:@include <stdio.h>
390 int main (int argc, char ** argv) {
391 FILE * fp = fopen("conftest.@S|@ac_ext", "rt");
392 return (fp == NULL) ? 1 : fclose(fp); }],
393 [libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
394 ) # end of RUN_IFELSE
395 ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
396 AC_MSG_RESULT([${libopts_cv_run_fopen_text}])
397 if test "X${libopts_cv_run_fopen_text}" != Xno
399 AC_DEFINE([FOPEN_TEXT_FLAG],"t",
400 [fopen(3) accepts a 't' in the mode flag])
402 AC_DEFINE([FOPEN_TEXT_FLAG],"",
403 [fopen(3) accepts a 't' in the mode flag])
406 ]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_TEXT
409 AC_DEFUN([LIBOPTS_DISABLE_OPTIONAL_ARGS],[
410 AC_ARG_ENABLE([optional-args],
411 AS_HELP_STRING([--disable-optional-args], [not wanting optional option args]),
412 [libopts_cv_enable_optional_args=${enable_optional_args}],
413 AC_CACHE_CHECK([whether not wanting optional option args], libopts_cv_enable_optional_args,
414 libopts_cv_enable_optional_args=yes)
415 ) # end of AC_ARG_ENABLE
416 if test "X${libopts_cv_enable_optional_args}" = Xno
418 AC_DEFINE([NO_OPTIONAL_OPT_ARGS], [1],
419 [Define this if optional arguments are disallowed])
422 ]) # end of AC_DEFUN of LIBOPTS_DISABLE_OPTIONAL_ARGS
425 AC_DEFUN([INVOKE_LIBOPTS_MACROS],[
426 AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
427 # Check to see if a reg expr header is specified.
428 LIBOPTS_WITH_REGEX_HEADER
430 # Check to see if a working libregex can be found.
431 LIBOPTS_WITHLIB_REGEX
433 # Check to see if pathfind(3) works.
436 # Check to see if /dev/zero is readable device.
437 LIBOPTS_TEST_DEV_ZERO
439 # Check to see if we have a functional realpath(3C).
442 # Check to see if strftime() works.
445 # Check to see if fopen accepts "b" mode.
446 LIBOPTS_RUN_FOPEN_BINARY
448 # Check to see if fopen accepts "t" mode.
449 LIBOPTS_RUN_FOPEN_TEXT
451 # Check to see if not wanting optional option args.
452 LIBOPTS_DISABLE_OPTIONAL_ARGS
454 ]) # end AC_DEFUN of INVOKE_LIBOPTS_MACROS
456 dnl @synopsis LIBOPTS_CHECK
458 dnl If autoopts-config works, add the linking information to LIBS.
459 dnl Otherwise, add ``libopts-${ao_rev}'' to SUBDIRS and run all
460 dnl the config tests that the library needs. Invoke the
461 dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts.
463 dnl This file is part of AutoGen.
464 dnl AutoGen Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
466 dnl AutoGen is free software: you can redistribute it and/or modify it
467 dnl under the terms of the GNU General Public License as published by the
468 dnl Free Software Foundation, either version 3 of the License, or
469 dnl (at your option) any later version.
471 dnl AutoGen is distributed in the hope that it will be useful, but
472 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
473 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
474 dnl See the GNU General Public License for more details.
476 dnl You should have received a copy of the GNU General Public License along
477 dnl with this program. If not, see <http://www.gnu.org/licenses/>.
479 dnl Default to system libopts
481 AC_DEFUN([LIBOPTS_CHECK_COMMON],[
482 AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
483 [NEED_LIBOPTS_DIR='']
484 m4_pushdef([AO_Libopts_Dir],
485 [ifelse($1, , [libopts], [$1])])
486 AC_ARG_ENABLE([local-libopts],
487 AC_HELP_STRING([--enable-local-libopts],
488 [Use the supplied libopts tearoff code]),[
489 if test x$enableval = xyes ; then
490 AC_MSG_NOTICE([Using supplied libopts tearoff])
491 LIBOPTS_CFLAGS='-I$(top_srcdir)/AO_Libopts_Dir'
492 NEED_LIBOPTS_DIR=true
493 LIBOPTS_LDADD='$(top_builddir)/AO_Libopts_Dir/libopts.la'
496 AC_ARG_ENABLE([libopts-install],
497 AC_HELP_STRING([--enable-libopts-install],
498 [Install libopts with client installation]))
499 AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" = Xyes])
501 [if test -z "${NEED_LIBOPTS_DIR}" ; then]
502 AC_MSG_CHECKING([whether autoopts-config can be found])
503 AC_ARG_WITH([autoopts-config],
504 AC_HELP_STRING([--with-autoopts-config],
505 [specify the config-info script]),
506 [lo_cv_with_autoopts_config=${with_autoopts_config}],
507 AC_CACHE_CHECK([whether autoopts-config is specified],
508 [lo_cv_with_autoopts_config],
509 [if autoopts-config --help 2>/dev/null 1>&2
510 then lo_cv_with_autoopts_config=autoopts-config
511 elif libopts-config --help 2>/dev/null 1>&2
512 then lo_cv_with_autoopts_config=libopts-config
513 else lo_cv_with_autoopts_config=no ; fi])
514 ) # end of AC_ARG_WITH
516 AC_CACHE_VAL([lo_cv_test_autoopts],[
517 if test -z "${lo_cv_with_autoopts_config}" \
518 -o X"${lo_cv_with_autoopts_config}" = Xno
520 if autoopts-config --help 2>/dev/null 1>&2
521 then lo_cv_with_autoopts_config=autoopts-config
522 elif libopts-config --help 2>/dev/null 1>&2
523 then lo_cv_with_autoopts_config=libopts-config
524 else lo_cv_with_autoopts_config=false ; fi
526 lo_cv_test_autoopts=`
527 ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
528 if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
529 then lo_cv_test_autoopts=no ; fi
530 ]) # end of CACHE_VAL
531 AC_MSG_RESULT([${lo_cv_test_autoopts}])
533 [if test "X${lo_cv_test_autoopts}" != Xno
535 LIBOPTS_LDADD="${lo_cv_test_autoopts}"
536 LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
538 LIBOPTS_LDADD='$(top_builddir)/]AO_Libopts_Dir[/libopts.la'
539 LIBOPTS_CFLAGS='-I$(top_srcdir)/]AO_Libopts_Dir['
540 NEED_LIBOPTS_DIR=true
542 fi # end of if test -z "${NEED_LIBOPTS_DIR}"
543 if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
546 AM_CONDITIONAL([NEED_LIBOPTS], [test -n "${NEED_LIBOPTS_DIR}"])
547 AC_SUBST(LIBOPTS_LDADD)
548 AC_SUBST(LIBOPTS_CFLAGS)
549 AC_SUBST(LIBOPTS_DIR, AO_Libopts_Dir)
550 m4_popdef([AO_Libopts_Dir])
551 [# end of AC_DEFUN of LIBOPTS_CHECK_COMMON]
554 dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
555 dnl AM_COND_IF is new to Automake 1.11. To use it on new Automake without
556 dnl requiring same, a fallback implementation for older Automake is provided.
557 dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
558 dnl is correct only in terms of m4sh generated script.
560 m4_ifndef([AM_COND_IF],
561 [AC_DEFUN([AM_COND_IF], [
562 if test -z "$$1_TRUE"; then :
572 AC_DEFUN([LIBOPTS_CHECK_NOBUILD], [
573 m4_pushdef([AO_Libopts_Dir],
574 [ifelse($1, , [libopts], [$1])])
575 LIBOPTS_BUILD_BLOCKED=true
576 LIBOPTS_CHECK_COMMON(AO_Libopts_Dir)
577 m4_popdef([AO_Libopts_Dir])dnl
578 # end of AC_DEFUN of LIBOPTS_CHECK_NOBUILD
581 AC_DEFUN([LIBOPTS_CHECK], [
582 m4_pushdef([AO_Libopts_Dir],
583 [ifelse($1, , [libopts], [$1])])
584 LIBOPTS_BUILD_BLOCKED=''
585 LIBOPTS_CHECK_COMMON(AO_Libopts_Dir)
586 AM_COND_IF([NEED_LIBOPTS], [
587 INVOKE_LIBOPTS_MACROS
589 AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)
590 m4_popdef([AO_Libopts_Dir])dnl
591 # end of AC_DEFUN of LIBOPTS_CHECK