libopts.m4 16 KB

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