Deleted Added
full compact
libopts.m4 (302408) libopts.m4 (181834)
1dnl -*- buffer-read-only: t -*- vi: set ro:
1dnl -*- buffer-read-only: t -*- vi: set ro:
2dnl
2dnl
3dnl DO NOT EDIT THIS FILE (libopts.m4)
3dnl DO NOT EDIT THIS FILE (libopts.m4)
4dnl
5dnl It has been AutoGen-ed
4dnl
5dnl It has been AutoGen-ed Saturday May 5, 2007 at 12:02:37 PM PDT
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],[
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 AC_REQUIRE([AC_HEADER_STDC])
12[if test X${INVOKE_LIBOPTS_MACROS_FIRST_done} != Xyes ; then]
13 # =================
14 # AC_HEADER_STDC
15 # =================
16 AC_HEADER_STDC
17 # =================
18 # AC_HEADER_DIRENT
19 # =================
13 AC_HEADER_DIRENT
20 AC_HEADER_DIRENT
14
21
15 # =================
16 # AC_CHECK_HEADERS
17 # =================
22 # =================
23 # AC_CHECK_HEADERS
24 # =================
18 AC_CHECK_HEADERS([ \
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 \
24 unistd.h utime.h])
25
26 AC_CHECK_HEADERS([stdarg.h varargs.h],
27 [lo_have_arg_hdr=true;break],
28 [lo_have_arg_hdr=false])
29
30 AC_CHECK_HEADERS([string.h strings.h],
31 [lo_have_str_hdr=true;break],
32 [lo_have_str_hdr=false])
33
34 AC_CHECK_HEADERS([limits.h sys/limits.h values.h],
35 [lo_have_lim_hdr=true;break],
36 [lo_have_lim_hdr=false])
37
38 AC_CHECK_HEADERS([inttypes.h stdint.h],
39 [lo_have_typ_hdr=true;break],
40 [lo_have_typ_hdr=false])
41 gl_STDNORETURN_H
42
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], [], [],[
48 AC_INCLUDES_DEFAULT
49 #if HAVE_RUNETYPE_H
50 # include <runetype.h>
51 #endif
52 ])
53
54 AC_ARG_ENABLE([nls],
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])])
59
25 AC_CHECK_HEADERS(dlfcn.h errno.h fcntl.h libgen.h memory.h netinet/in.h \
26 setjmp.h sys/mman.h sys/param.h sys/poll.h sys/procset.h sys/select.h \
27 sys/socket.h sys/stropts.h sys/time.h sys/un.h sys/wait.h unistd.h \
28 utime.h sysexits.h)
29
60 # --------------------------------------------
61 # Verify certain entries from AC_CHECK_HEADERS
62 # --------------------------------------------
30 # --------------------------------------------
31 # Verify certain entries from AC_CHECK_HEADERS
32 # --------------------------------------------
63 [${lo_have_arg_hdr} || \
64 ]AC_MSG_ERROR([you must have stdarg.h or varargs.h on your system])[
65
66 ${lo_have_str_hdr} || \
67 ]AC_MSG_ERROR([you must have string.h or strings.h on your system])[
68
69 ${lo_have_lim_hdr} || \
70 ]AC_MSG_ERROR(
71 [you must have one of limits.h, sys/limits.h or values.h])[
72
73 ${lo_have_typ_hdr} || \
74 ]AC_MSG_ERROR([you must have inttypes.h or stdint.h on your system])[
75
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])[
80 }
33 [for f in sys_types sys_mman sys_param sys_stat sys_wait \
34 string errno stdlib memory setjmp
35 do eval as_ac_var=\${ac_cv_header_${f}_h+set}
36 test "${as_ac_var}" = set] || \
37 AC_MSG_ERROR([You must have ${f}.h on your system])
81 done
38 done
82 test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
83 echo '#include <stdint.h>' > inttypes.h]
84
39
40 # ================================================
41 # AC_CHECK_HEADERS: stdarg.h is present define HAVE_STDARG_H, otherwise
42 # if varargs.h is present define HAVE_VARARGS_H.
43 # ================================================
44 AC_CHECK_HEADERS(stdarg.h varargs.h, break)
45 [if test `eval echo '${'$as_ac_Header'}'` != yes; then]
46 AC_MSG_ERROR([You must have stdarg.h or varargs.h on your system])
47 fi
48
49 # ================================================
50 # Similarly for the string.h and strings.h headers
51 # ================================================
52 AC_CHECK_HEADERS(string.h strings.h, break)
53 [if test `eval echo '${'$as_ac_Header'}'` != yes; then]
54 AC_MSG_ERROR([You must have string.h or strings.h on your system])
55 fi
56
57 # =====================
58 # ...and limits headers
59 # =====================
60 AC_CHECK_HEADERS(limits.h sys/limits.h values.h, break)
61 [if test `eval echo '${'$as_ac_Header'}'` != yes; then]
62 AC_MSG_ERROR([You must have one of limits.h, sys/limits.h or values.h])
63 fi
64
65 # ========================
66 # ...and int types headers
67 # ========================
68 AC_CHECK_HEADERS(stdint.h inttypes.h, break)
69 AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t,
70 intptr_t, uint_t])
71
72 # ====================
73 # uintptr type & sizes
74 # ====================
75 AC_CHECK_TYPES([uintptr_t], ,
76 [AC_DEFINE([uintptr_t], unsigned long,
77 [Alternate uintptr_t for systems without it.])])
78 AC_CHECK_SIZEOF(char*, 4)
79 AC_CHECK_SIZEOF(int, 4)
80 AC_CHECK_SIZEOF(long, 4)
81 AC_CHECK_SIZEOF(short, 2)
82
85 # ----------------------------------------------------------------------
83 # ----------------------------------------------------------------------
86 # Checks for typedefs
84 # AC_CHECK_LIB for SVR4 libgen, and use it if it defines pathfind.
87 # ----------------------------------------------------------------------
85 # ----------------------------------------------------------------------
88 AC_CHECK_TYPES(wchar_t)
89 AC_CHECK_TYPES(wint_t, [], [], [
90 AC_INCLUDES_DEFAULT
91 #if HAVE_RUNETYPE_H
92 # include <runetype.h>
93 #endif
94 #if HAVE_WCHAR_H
95 # include <wchar.h>
96 #endif
97 ])
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)
104
105 # ------------
106 # AC_CHECK_LIB
107 # ------------
108 AC_CHECK_LIB(gen, pathfind)
86 AC_CHECK_LIB(gen, pathfind)
109 AC_CHECK_LIB(intl,gettext)
110 AC_FUNC_VPRINTF
87 AC_FUNC_VPRINTF
111 AC_FUNC_FORK
112 AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
113 strrchr strsignal fchmod fstat chmod])
114 AC_PROG_SED
115 [while :
116 do
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 '
124 exec 2>/dev/null
125 if ! true ; then exit 1 ; fi
126 echo /bin/sh'`
127 test -x "$POSIX_SHELL" && break
128 ]AC_MSG_ERROR([cannot locate a working POSIX shell])[
129 done]
130 AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"],
131 [define to a working POSIX compliant shell])
132 AC_SUBST([POSIX_SHELL])
133])
88 AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr strrchr])
89[ INVOKE_LIBOPTS_MACROS_FIRST_done=yes
90fi]])
134
135dnl
136dnl @synopsis INVOKE_LIBOPTS_MACROS
137dnl
138dnl This macro will invoke the AutoConf macros specified in libopts.def
139dnl that have not been disabled with "omit-invocation".
140dnl
141AC_DEFUN([LIBOPTS_WITH_REGEX_HEADER],[
142 AC_ARG_WITH([regex-header],
91
92dnl
93dnl @synopsis INVOKE_LIBOPTS_MACROS
94dnl
95dnl This macro will invoke the AutoConf macros specified in libopts.def
96dnl that have not been disabled with "omit-invocation".
97dnl
98AC_DEFUN([LIBOPTS_WITH_REGEX_HEADER],[
99 AC_ARG_WITH([regex-header],
143 AS_HELP_STRING([--with-regex-header], [a reg expr header is specified]),
100 AC_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
101 [libopts_cv_with_regex_header=${with_regex_header}],
102 AC_CACHE_CHECK([whether a reg expr header is specified], libopts_cv_with_regex_header,
103 libopts_cv_with_regex_header=no)
104 ) # end of AC_ARG_WITH
105
148 if test "X${libopts_cv_with_regex_header}" != Xno
149 then
150 AC_DEFINE_UNQUOTED([REGEX_HEADER],[<${libopts_cv_with_regex_header}>])
151 else
152 AC_DEFINE([REGEX_HEADER],[<regex.h>],[name of regex header file])
153 fi
106 if test "X${libopts_cv_with_regex_header}" != Xno
107 then
108 AC_DEFINE_UNQUOTED([REGEX_HEADER],[<${libopts_cv_with_regex_header}>])
109 else
110 AC_DEFINE([REGEX_HEADER],[<regex.h>],[name of regex header file])
111 fi
154
112
155]) # end of AC_DEFUN of LIBOPTS_WITH_REGEX_HEADER
156
157
158AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
159 AC_ARG_WITH([libregex],
113]) # end of AC_DEFUN of LIBOPTS_WITH_REGEX_HEADER
114
115
116AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
117 AC_ARG_WITH([libregex],
160 AS_HELP_STRING([--with-libregex], [libregex installation prefix]),
118 AC_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
165
119 [libopts_cv_with_libregex_root=${with_libregex}],
120 AC_CACHE_CHECK([whether with-libregex was specified], libopts_cv_with_libregex_root,
121 libopts_cv_with_libregex_root=no)
122 ) # end of AC_ARG_WITH libregex
123
166 if test "${with_libregex+set}" = set && \
167 test "X${withval}" = Xno
124 if test "${with_libguile+set}" = set && \
125 test "${withval}" = no
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
172 else
173
174 AC_ARG_WITH([libregex-cflags],
126 then ## disabled by request
127 libopts_cv_with_libregex_root=no
128 libopts_cv_with_libregex_cflags=no
129 libopts_cv_with_libregex_libs=no
130 else
131
132 AC_ARG_WITH([libregex-cflags],
175 AS_HELP_STRING([--with-libregex-cflags], [libregex compile flags]),
176 [libopts_cv_with_libregex_cflags=${with_libregex_cflags}],
133 AC_HELP_STRING([--with-libregex-cflags], [libregex compile flags]),
134 [libopts_cv_with_libregex_cflags=${with_regex_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
180
181 AC_ARG_WITH([libregex-libs],
135 AC_CACHE_CHECK([whether with-libregex-cflags was specified], libopts_cv_with_libregex_cflags,
136 libopts_cv_with_libregex_cflags=no)
137 ) # end of AC_ARG_WITH libregex-cflags
138
139 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}],
140 AC_HELP_STRING([--with-libregex-libs], [libregex link command arguments]),
141 [libopts_cv_with_libregex_libs=${with_regex_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
187
188 case "X${libopts_cv_with_libregex_cflags}" in
189 Xyes|Xno|X )
190 case "X${libopts_cv_with_libregex_root}" in
191 Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
142 AC_CACHE_CHECK([whether with-libregex-libs was specified], libopts_cv_with_libregex_libs,
143 libopts_cv_with_libregex_libs=no)
144 ) # end of AC_ARG_WITH libregex-libs
145
146 case "X${libopts_cv_with_libregex_cflags}" in
147 Xyes|Xno|X )
148 case "X${libopts_cv_with_libregex_root}" in
149 Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
192 * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
150 * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
193 esac
194 esac
195 case "X${libopts_cv_with_libregex_libs}" in
196 Xyes|Xno|X )
197 case "X${libopts_cv_with_libregex_root}" in
198 Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
151 esac
152 esac
153 case "X${libopts_cv_with_libregex_libs}" in
154 Xyes|Xno|X )
155 case "X${libopts_cv_with_libregex_root}" in
156 Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
199 * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
157 * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex";;
200 esac
201 esac
202 libopts_save_CPPFLAGS="${CPPFLAGS}"
203 libopts_save_LIBS="${LIBS}"
158 esac
159 esac
160 libopts_save_CPPFLAGS="${CPPFLAGS}"
161 libopts_save_LIBS="${LIBS}"
162 fi ## disabled by request
163
204 case "X${libopts_cv_with_libregex_cflags}" in
205 Xyes|Xno|X )
206 libopts_cv_with_libregex_cflags="" ;;
207 * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
208 esac
209 case "X${libopts_cv_with_libregex_libs}" in
210 Xyes|Xno|X )
211 libopts_cv_with_libregex_libs="" ;;
212 * )
213 LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
214 esac
215 LIBREGEX_CFLAGS=""
216 LIBREGEX_LIBS=""
217 AC_MSG_CHECKING([whether libregex functions properly])
218 AC_CACHE_VAL([libopts_cv_with_libregex],[
164 case "X${libopts_cv_with_libregex_cflags}" in
165 Xyes|Xno|X )
166 libopts_cv_with_libregex_cflags="" ;;
167 * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
168 esac
169 case "X${libopts_cv_with_libregex_libs}" in
170 Xyes|Xno|X )
171 libopts_cv_with_libregex_libs="" ;;
172 * )
173 LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
174 esac
175 LIBREGEX_CFLAGS=""
176 LIBREGEX_LIBS=""
177 AC_MSG_CHECKING([whether libregex functions properly])
178 AC_CACHE_VAL([libopts_cv_with_libregex],[
219 AC_RUN_IFELSE([@%:@include <stdio.h>
179 AC_TRY_RUN([@%:@include <stdio.h>
220@%:@include <stdlib.h>
221@%:@include <sys/types.h>
222@%:@include REGEX_HEADER
223static regex_t re;
180@%:@include <stdlib.h>
181@%:@include <sys/types.h>
182@%:@include REGEX_HEADER
183static regex_t re;
224void comp_re(char const * pzPat) {
184void comp_re( char const* pzPat ) {
225 int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
226 if (res == 0) return;
227 exit( res ); }
228int main() {
229 regmatch_t m@<:@2@:>@;
230 comp_re( "^.*\@S|@" );
231 comp_re( "()|no.*" );
232 comp_re( "." );
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 );
236 return 1;
237 }
238 return 0; }],
239 [libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
185 int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
186 if (res == 0) return;
187 exit( res ); }
188int main() {
189 regmatch_t m@<:@2@:>@;
190 comp_re( "^.*\@S|@" );
191 comp_re( "()|no.*" );
192 comp_re( "." );
193 if (regexec( &re, "X", 2, m, 0 ) != 0) return 1;
194 if ((m@<:@0@:>@.rm_so != 0) || (m@<:@0@:>@.rm_eo != 1)) {
195 fputs( "error: regex -->.<-- did not match\n", stderr );
196 return 1;
197 }
198 return 0; }],
199 [libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
240 [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
200 [libopts_cv_with_libregex=no]) # end of AC_TRY_RUN
241 ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
201 ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
242 fi ## disabled by request
243 AC_MSG_RESULT([${libopts_cv_with_libregex}])
202 AC_MSG_RESULT([${libopts_cv_with_libregex}])
203
244 if test "X${libopts_cv_with_libregex}" != Xno
245 then
246 AC_DEFINE([WITH_LIBREGEX],[1],
247 [Define this if a working libregex can be found])
248 else
249 CPPFLAGS="${libopts_save_CPPFLAGS}"
250 LIBS="${libopts_save_LIBS}"
204 if test "X${libopts_cv_with_libregex}" != Xno
205 then
206 AC_DEFINE([WITH_LIBREGEX],[1],
207 [Define this if a working libregex can be found])
208 else
209 CPPFLAGS="${libopts_save_CPPFLAGS}"
210 LIBS="${libopts_save_LIBS}"
251 libopts_cv_with_libregex_root=no
252libopts_cv_with_libregex_cflags=no
253libopts_cv_with_libregex_libs=no
254libopts_cv_with_libregex=no
255 fi
211 fi
256
212
257]) # end of AC_DEFUN of LIBOPTS_WITHLIB_REGEX
258
259
260AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
261 AC_MSG_CHECKING([whether pathfind(3) works])
262 AC_CACHE_VAL([libopts_cv_run_pathfind],[
213]) # end of AC_DEFUN of LIBOPTS_WITHLIB_REGEX
214
215
216AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
217 AC_MSG_CHECKING([whether pathfind(3) works])
218 AC_CACHE_VAL([libopts_cv_run_pathfind],[
263 AC_RUN_IFELSE([@%:@include <string.h>
219 AC_TRY_RUN([@%:@include <string.h>
264@%:@include <stdlib.h>
220@%:@include <stdlib.h>
265int main (int argc, char ** argv) {
266 char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
221int main (int argc, char** argv) {
222 char* pz = pathfind( getenv( "PATH" ), "sh", "x" );
267 return (pz == 0) ? 1 : 0;
268}],
269 [libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
223 return (pz == 0) ? 1 : 0;
224}],
225 [libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
270 ) # end of RUN_IFELSE
226 ) # end of TRY_RUN
271 ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
272 AC_MSG_RESULT([${libopts_cv_run_pathfind}])
227 ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
228 AC_MSG_RESULT([${libopts_cv_run_pathfind}])
229
273 if test "X${libopts_cv_run_pathfind}" != Xno
274 then
275 AC_DEFINE([HAVE_PATHFIND],[1],
276 [Define this if pathfind(3) works])
277 fi
230 if test "X${libopts_cv_run_pathfind}" != Xno
231 then
232 AC_DEFINE([HAVE_PATHFIND],[1],
233 [Define this if pathfind(3) works])
234 fi
278
235
279]) # end of AC_DEFUN of LIBOPTS_RUN_PATHFIND
280
281
282AC_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
286dzero=\`ls -lL /dev/zero | egrep ^c......r\`
287test -z "${dzero}" && exit 1
288echo ${dzero}`
236]) # end of AC_DEFUN of LIBOPTS_RUN_PATHFIND
237
238
239AC_DEFUN([LIBOPTS_TEST_DEV_ZERO],[
240 AC_MSG_CHECKING([whether /dev/zero is readable device])
241 AC_CACHE_VAL([libopts_cv_test_dev_zero],[
242 libopts_cv_test_dev_zero=`exec 2> /dev/null
243dzero=\`ls -lL /dev/zero | egrep ^c......r\`
244test -z "${dzero}" && exit 1
245echo ${dzero}`
289 if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
246 if test $? -ne 0
290 then libopts_cv_test_dev_zero=no
247 then libopts_cv_test_dev_zero=no
248 elif test -z "$libopts_cv_test_dev_zero"
249 then libopts_cv_test_dev_zero=no
291 fi
292 ]) # end of CACHE_VAL of libopts_cv_test_dev_zero
293 AC_MSG_RESULT([${libopts_cv_test_dev_zero}])
250 fi
251 ]) # end of CACHE_VAL of libopts_cv_test_dev_zero
252 AC_MSG_RESULT([${libopts_cv_test_dev_zero}])
253
294 if test "X${libopts_cv_test_dev_zero}" != Xno
295 then
296 AC_DEFINE([HAVE_DEV_ZERO],[1],
297 [Define this if /dev/zero is readable device])
298 fi
254 if test "X${libopts_cv_test_dev_zero}" != Xno
255 then
256 AC_DEFINE([HAVE_DEV_ZERO],[1],
257 [Define this if /dev/zero is readable device])
258 fi
299
259
300]) # end of AC_DEFUN of LIBOPTS_TEST_DEV_ZERO
301
302
303AC_DEFUN([LIBOPTS_RUN_REALPATH],[
304 AC_MSG_CHECKING([whether we have a functional realpath(3C)])
305 AC_CACHE_VAL([libopts_cv_run_realpath],[
260]) # end of AC_DEFUN of LIBOPTS_TEST_DEV_ZERO
261
262
263AC_DEFUN([LIBOPTS_RUN_REALPATH],[
264 AC_MSG_CHECKING([whether we have a functional realpath(3C)])
265 AC_CACHE_VAL([libopts_cv_run_realpath],[
306 AC_RUN_IFELSE([@%:@include <limits.h>
266 AC_TRY_RUN([@%:@include <limits.h>
307@%:@include <stdlib.h>
267@%:@include <stdlib.h>
308int main (int argc, char ** argv) {
268int main (int argc, char** argv) {
309@%:@ifndef PATH_MAX
310choke me!!
311@%:@else
312 char zPath@<:@PATH_MAX+1@:>@;
313@%:@endif
314 char *pz = realpath(argv@<:@0@:>@, zPath);
315 return (pz == zPath) ? 0 : 1;
316}],
317 [libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
269@%:@ifndef PATH_MAX
270choke me!!
271@%:@else
272 char zPath@<:@PATH_MAX+1@:>@;
273@%:@endif
274 char *pz = realpath(argv@<:@0@:>@, zPath);
275 return (pz == zPath) ? 0 : 1;
276}],
277 [libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
318 ) # end of RUN_IFELSE
278 ) # end of TRY_RUN
319 ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
320 AC_MSG_RESULT([${libopts_cv_run_realpath}])
279 ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
280 AC_MSG_RESULT([${libopts_cv_run_realpath}])
281
321 if test "X${libopts_cv_run_realpath}" != Xno
322 then
323 AC_DEFINE([HAVE_REALPATH],[1],
324 [Define this if we have a functional realpath(3C)])
325 fi
282 if test "X${libopts_cv_run_realpath}" != Xno
283 then
284 AC_DEFINE([HAVE_REALPATH],[1],
285 [Define this if we have a functional realpath(3C)])
286 fi
326
287
327]) # end of AC_DEFUN of LIBOPTS_RUN_REALPATH
328
329
330AC_DEFUN([LIBOPTS_RUN_STRFTIME],[
331 AC_MSG_CHECKING([whether strftime() works])
332 AC_CACHE_VAL([libopts_cv_run_strftime],[
288]) # end of AC_DEFUN of LIBOPTS_RUN_REALPATH
289
290
291AC_DEFUN([LIBOPTS_RUN_STRFTIME],[
292 AC_MSG_CHECKING([whether strftime() works])
293 AC_CACHE_VAL([libopts_cv_run_strftime],[
333 AC_RUN_IFELSE([@%:@include <time.h>
294 AC_TRY_RUN([@%:@include <time.h>
334@%:@include <string.h>
335char t_buf@<:@ 64 @:>@;
336int main() {
337 static char const z@<:@@:>@ = "Thursday Aug 28 240";
338 struct tm tm;
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]
295@%:@include <string.h>
296char t_buf@<:@ 64 @:>@;
297int main() {
298 static char const z@<:@@:>@ = "Thursday Aug 28 240";
299 struct tm tm;
300 tm.tm_sec = 36; /* seconds after the minute @<:@0, 61@:>@ */
301 tm.tm_min = 44; /* minutes after the hour @<:@0, 59@:>@ */
302 tm.tm_hour = 12; /* hour since midnight @<:@0, 23@:>@ */
303 tm.tm_mday = 28; /* day of the month @<:@1, 31@:>@ */
304 tm.tm_mon = 7; /* months since January @<:@0, 11@:>@ */
305 tm.tm_year = 86; /* years since 1900 */
306 tm.tm_wday = 4; /* days since Sunday @<:@0, 6@:>@ */
307 tm.tm_yday = 239; /* days since January 1 @<:@0, 365@:>@ */
308 tm.tm_isdst = 1; /* flag for daylight savings time */
309 strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
310 return (strcmp( t_buf, z ) != 0); }],
311 [libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
351 ) # end of RUN_IFELSE
312 ) # end of TRY_RUN
352 ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
353 AC_MSG_RESULT([${libopts_cv_run_strftime}])
313 ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
314 AC_MSG_RESULT([${libopts_cv_run_strftime}])
315
354 if test "X${libopts_cv_run_strftime}" != Xno
355 then
356 AC_DEFINE([HAVE_STRFTIME],[1],
357 [Define this if strftime() works])
358 fi
316 if test "X${libopts_cv_run_strftime}" != Xno
317 then
318 AC_DEFINE([HAVE_STRFTIME],[1],
319 [Define this if strftime() works])
320 fi
359
321
360]) # end of AC_DEFUN of LIBOPTS_RUN_STRFTIME
361
362
363AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
364 AC_MSG_CHECKING([whether fopen accepts "b" mode])
365 AC_CACHE_VAL([libopts_cv_run_fopen_binary],[
322]) # end of AC_DEFUN of LIBOPTS_RUN_STRFTIME
323
324
325AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
326 AC_MSG_CHECKING([whether fopen accepts "b" mode])
327 AC_CACHE_VAL([libopts_cv_run_fopen_binary],[
366 AC_RUN_IFELSE([@%:@include <stdio.h>
367int main (int argc, char ** argv) {
368FILE * fp = fopen("conftest.@S|@ac_ext", "rb");
328 AC_TRY_RUN([@%:@include <stdio.h>
329int main (int argc, char** argv) {
330FILE* fp = fopen("conftest.@S|@ac_ext", "rb");
369return (fp == NULL) ? 1 : fclose(fp); }],
370 [libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
331return (fp == NULL) ? 1 : fclose(fp); }],
332 [libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
371 ) # end of RUN_IFELSE
333 ) # end of TRY_RUN
372 ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
373 AC_MSG_RESULT([${libopts_cv_run_fopen_binary}])
334 ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
335 AC_MSG_RESULT([${libopts_cv_run_fopen_binary}])
336
374 if test "X${libopts_cv_run_fopen_binary}" != Xno
375 then
376 AC_DEFINE([FOPEN_BINARY_FLAG],"b",
377 [fopen(3) accepts a 'b' in the mode flag])
378 else
379 AC_DEFINE([FOPEN_BINARY_FLAG],"",
380 [fopen(3) accepts a 'b' in the mode flag])
381 fi
337 if test "X${libopts_cv_run_fopen_binary}" != Xno
338 then
339 AC_DEFINE([FOPEN_BINARY_FLAG],"b",
340 [fopen(3) accepts a 'b' in the mode flag])
341 else
342 AC_DEFINE([FOPEN_BINARY_FLAG],"",
343 [fopen(3) accepts a 'b' in the mode flag])
344 fi
382
345
383]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_BINARY
384
385
386AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
387 AC_MSG_CHECKING([whether fopen accepts "t" mode])
388 AC_CACHE_VAL([libopts_cv_run_fopen_text],[
346]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_BINARY
347
348
349AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
350 AC_MSG_CHECKING([whether fopen accepts "t" mode])
351 AC_CACHE_VAL([libopts_cv_run_fopen_text],[
389 AC_RUN_IFELSE([@%:@include <stdio.h>
390int main (int argc, char ** argv) {
391FILE * fp = fopen("conftest.@S|@ac_ext", "rt");
352 AC_TRY_RUN([@%:@include <stdio.h>
353int main (int argc, char** argv) {
354FILE* fp = fopen("conftest.@S|@ac_ext", "rt");
392return (fp == NULL) ? 1 : fclose(fp); }],
393 [libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
355return (fp == NULL) ? 1 : fclose(fp); }],
356 [libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
394 ) # end of RUN_IFELSE
357 ) # end of TRY_RUN
395 ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
396 AC_MSG_RESULT([${libopts_cv_run_fopen_text}])
358 ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
359 AC_MSG_RESULT([${libopts_cv_run_fopen_text}])
360
397 if test "X${libopts_cv_run_fopen_text}" != Xno
398 then
399 AC_DEFINE([FOPEN_TEXT_FLAG],"t",
400 [fopen(3) accepts a 't' in the mode flag])
401 else
402 AC_DEFINE([FOPEN_TEXT_FLAG],"",
403 [fopen(3) accepts a 't' in the mode flag])
404 fi
361 if test "X${libopts_cv_run_fopen_text}" != Xno
362 then
363 AC_DEFINE([FOPEN_TEXT_FLAG],"t",
364 [fopen(3) accepts a 't' in the mode flag])
365 else
366 AC_DEFINE([FOPEN_TEXT_FLAG],"",
367 [fopen(3) accepts a 't' in the mode flag])
368 fi
405
369
406]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_TEXT
407
408
409AC_DEFUN([LIBOPTS_DISABLE_OPTIONAL_ARGS],[
410 AC_ARG_ENABLE([optional-args],
370]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_TEXT
371
372
373AC_DEFUN([LIBOPTS_DISABLE_OPTIONAL_ARGS],[
374 AC_ARG_ENABLE([optional-args],
411 AS_HELP_STRING([--disable-optional-args], [not wanting optional option args]),
375 AC_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
376 [libopts_cv_enable_optional_args=${enable_optional_args}],
377 AC_CACHE_CHECK([whether not wanting optional option args], libopts_cv_enable_optional_args,
378 libopts_cv_enable_optional_args=yes)
379 ) # end of AC_ARG_ENABLE
380
416 if test "X${libopts_cv_enable_optional_args}" = Xno
417 then
418 AC_DEFINE([NO_OPTIONAL_OPT_ARGS], [1],
419 [Define this if optional arguments are disallowed])
420 fi
381 if test "X${libopts_cv_enable_optional_args}" = Xno
382 then
383 AC_DEFINE([NO_OPTIONAL_OPT_ARGS], [1],
384 [Define this if optional arguments are disallowed])
385 fi
421
386
422]) # end of AC_DEFUN of LIBOPTS_DISABLE_OPTIONAL_ARGS
423
424
425AC_DEFUN([INVOKE_LIBOPTS_MACROS],[
387]) # end of AC_DEFUN of LIBOPTS_DISABLE_OPTIONAL_ARGS
388
389
390AC_DEFUN([INVOKE_LIBOPTS_MACROS],[
426 AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
391 INVOKE_LIBOPTS_MACROS_FIRST
427 # Check to see if a reg expr header is specified.
428 LIBOPTS_WITH_REGEX_HEADER
429
430 # Check to see if a working libregex can be found.
431 LIBOPTS_WITHLIB_REGEX
432
433 # Check to see if pathfind(3) works.
434 LIBOPTS_RUN_PATHFIND

--- 15 unchanged lines hidden (view full) ---

450
451 # Check to see if not wanting optional option args.
452 LIBOPTS_DISABLE_OPTIONAL_ARGS
453
454]) # end AC_DEFUN of INVOKE_LIBOPTS_MACROS
455
456dnl @synopsis LIBOPTS_CHECK
457dnl
392 # Check to see if a reg expr header is specified.
393 LIBOPTS_WITH_REGEX_HEADER
394
395 # Check to see if a working libregex can be found.
396 LIBOPTS_WITHLIB_REGEX
397
398 # Check to see if pathfind(3) works.
399 LIBOPTS_RUN_PATHFIND

--- 15 unchanged lines hidden (view full) ---

415
416 # Check to see if not wanting optional option args.
417 LIBOPTS_DISABLE_OPTIONAL_ARGS
418
419]) # end AC_DEFUN of INVOKE_LIBOPTS_MACROS
420
421dnl @synopsis LIBOPTS_CHECK
422dnl
423dnl Time-stamp: "2006-09-23 19:36:24 bkorb"
424dnl Last Committed: $Date: 2006/09/24 02:59:00 $
425dnl
458dnl If autoopts-config works, add the linking information to LIBS.
459dnl Otherwise, add ``libopts-${ao_rev}'' to SUBDIRS and run all
460dnl the config tests that the library needs. Invoke the
461dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts.
462dnl
426dnl If autoopts-config works, add the linking information to LIBS.
427dnl Otherwise, add ``libopts-${ao_rev}'' to SUBDIRS and run all
428dnl the config tests that the library needs. Invoke the
429dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts.
430dnl
463dnl This file is part of AutoGen.
464dnl AutoGen Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
465dnl
466dnl AutoGen is free software: you can redistribute it and/or modify it
467dnl under the terms of the GNU General Public License as published by the
468dnl Free Software Foundation, either version 3 of the License, or
469dnl (at your option) any later version.
470dnl
471dnl AutoGen is distributed in the hope that it will be useful, but
472dnl WITHOUT ANY WARRANTY; without even the implied warranty of
473dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
474dnl See the GNU General Public License for more details.
475dnl
476dnl You should have received a copy of the GNU General Public License along
477dnl with this program. If not, see <http://www.gnu.org/licenses/>.
478dnl
479dnl Default to system libopts
480dnl
431dnl Default to system libopts
432dnl
481AC_DEFUN([LIBOPTS_CHECK_COMMON],[
482 AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
433AC_DEFUN([LIBOPTS_CHECK],[
483 [NEED_LIBOPTS_DIR='']
484 m4_pushdef([AO_Libopts_Dir],
485 [ifelse($1, , [libopts], [$1])])
434 [NEED_LIBOPTS_DIR='']
435 m4_pushdef([AO_Libopts_Dir],
436 [ifelse($1, , [libopts], [$1])])
437 AC_SUBST(LIBOPTS_DIR, AO_Libopts_Dir)
486 AC_ARG_ENABLE([local-libopts],
487 AC_HELP_STRING([--enable-local-libopts],
438 AC_ARG_ENABLE([local-libopts],
439 AC_HELP_STRING([--enable-local-libopts],
488 [Use the supplied libopts tearoff code]),[
440 [Force using the supplied libopts tearoff code]),[
489 if test x$enableval = xyes ; then
490 AC_MSG_NOTICE([Using supplied libopts tearoff])
441 if test x$enableval = xyes ; then
442 AC_MSG_NOTICE([Using supplied libopts tearoff])
443 LIBOPTS_LDADD='$(top_builddir)/AO_Libopts_Dir/libopts.la'
491 LIBOPTS_CFLAGS='-I$(top_srcdir)/AO_Libopts_Dir'
492 NEED_LIBOPTS_DIR=true
444 LIBOPTS_CFLAGS='-I$(top_srcdir)/AO_Libopts_Dir'
445 NEED_LIBOPTS_DIR=true
493 LIBOPTS_LDADD='$(top_builddir)/AO_Libopts_Dir/libopts.la'
494 fi])
495
496 AC_ARG_ENABLE([libopts-install],
446 fi])
447
448 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])
449 AC_HELP_STRING([--disable-libopts-install],
450 [Do not install libopts with client installation]))
451 AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" != Xno])
500
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],

--- 26 unchanged lines hidden (view full) ---

534 then
535 LIBOPTS_LDADD="${lo_cv_test_autoopts}"
536 LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
537 else
538 LIBOPTS_LDADD='$(top_builddir)/]AO_Libopts_Dir[/libopts.la'
539 LIBOPTS_CFLAGS='-I$(top_srcdir)/]AO_Libopts_Dir['
540 NEED_LIBOPTS_DIR=true
541 fi
452
453 [if test -z "${NEED_LIBOPTS_DIR}" ; then]
454 AC_MSG_CHECKING([whether autoopts-config can be found])
455 AC_ARG_WITH([autoopts-config],
456 AC_HELP_STRING([--with-autoopts-config],
457 [specify the config-info script]),
458 [lo_cv_with_autoopts_config=${with_autoopts_config}],
459 AC_CACHE_CHECK([whether autoopts-config is specified],

--- 26 unchanged lines hidden (view full) ---

486 then
487 LIBOPTS_LDADD="${lo_cv_test_autoopts}"
488 LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
489 else
490 LIBOPTS_LDADD='$(top_builddir)/]AO_Libopts_Dir[/libopts.la'
491 LIBOPTS_CFLAGS='-I$(top_srcdir)/]AO_Libopts_Dir['
492 NEED_LIBOPTS_DIR=true
493 fi
542 fi # end of if test -z "${NEED_LIBOPTS_DIR}"
543 if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
544 NEED_LIBOPTS_DIR=''
545 fi]
494 fi # end of if test -z "${NEED_LIBOPTS_DIR}"]
495
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)
496 AM_CONDITIONAL([NEED_LIBOPTS], [test -n "${NEED_LIBOPTS_DIR}"])
497 AC_SUBST(LIBOPTS_LDADD)
498 AC_SUBST(LIBOPTS_CFLAGS)
499 AC_SUBST(LIBOPTS_DIR, AO_Libopts_Dir)
500 AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)
550 m4_popdef([AO_Libopts_Dir])
501 m4_popdef([AO_Libopts_Dir])
551[# end of AC_DEFUN of LIBOPTS_CHECK_COMMON]
552])
553dnl
554dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
555dnl AM_COND_IF is new to Automake 1.11. To use it on new Automake without
556dnl requiring same, a fallback implementation for older Automake is provided.
557dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
558dnl is correct only in terms of m4sh generated script.
559dnl
560m4_ifndef([AM_COND_IF],
561 [AC_DEFUN([AM_COND_IF], [
562 if test -z "$$1_TRUE"; then :
563 m4_n([$2])[]dnl
564 m4_ifval([$3],[
565 else
566 $3
567 ])dnl
568 fi[]dnl
569 ])dnl
570])
571dnl
572AC_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
579])
580dnl
581AC_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], [
502
503 [if test -n "${NEED_LIBOPTS_DIR}" ; then]
587 INVOKE_LIBOPTS_MACROS
504 INVOKE_LIBOPTS_MACROS
588 ])
589 AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)
590 m4_popdef([AO_Libopts_Dir])dnl
591# end of AC_DEFUN of LIBOPTS_CHECK
505 else
506 INVOKE_LIBOPTS_MACROS_FIRST
507 [fi
508# end of AC_DEFUN of LIBOPTS_CHECK]
592])
509])