PageRenderTime 45ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/src/kernel/parser/byacc/aclocal.m4

https://github.com/MagLev/maglev
m4 | 1017 lines | 893 code | 44 blank | 80 comment | 0 complexity | d07c5815160893bff70f8ae819b254b3 MD5 | raw file
Possible License(s): LGPL-2.1
  1. dnl $Id: aclocal.m4,v 1.15 2010/06/09 09:30:08 tom Exp $
  2. dnl Macros for byacc configure script (Thomas E. Dickey)
  3. dnl ---------------------------------------------------------------------------
  4. dnl Copyright 2004-2009,2010 Thomas E. Dickey
  5. dnl
  6. dnl Permission is hereby granted, free of charge, to any person obtaining a
  7. dnl copy of this software and associated documentation files (the
  8. dnl "Software"), to deal in the Software without restriction, including
  9. dnl without limitation the rights to use, copy, modify, merge, publish,
  10. dnl distribute, distribute with modifications, sublicense, and/or sell
  11. dnl copies of the Software, and to permit persons to whom the Software is
  12. dnl furnished to do so, subject to the following conditions:
  13. dnl
  14. dnl The above copyright notice and this permission notice shall be included
  15. dnl in all copies or portions of the Software.
  16. dnl
  17. dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  18. dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  20. dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  21. dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  22. dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
  23. dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  24. dnl
  25. dnl Except as contained in this notice, the name(s) of the above copyright
  26. dnl holders shall not be used in advertising or otherwise to promote the
  27. dnl sale, use or other dealings in this Software without prior written
  28. dnl authorization.
  29. dnl ---------------------------------------------------------------------------
  30. dnl ---------------------------------------------------------------------------
  31. dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
  32. dnl -------------
  33. dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
  34. dnl The second parameter if given makes this macro verbose.
  35. dnl
  36. dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
  37. dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
  38. dnl confused by the quotes (which require backslashes to keep them usable).
  39. AC_DEFUN([CF_ADD_CFLAGS],
  40. [
  41. cf_fix_cppflags=no
  42. cf_new_cflags=
  43. cf_new_cppflags=
  44. cf_new_extra_cppflags=
  45. for cf_add_cflags in $1
  46. do
  47. case $cf_fix_cppflags in
  48. no)
  49. case $cf_add_cflags in #(vi
  50. -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
  51. case $cf_add_cflags in
  52. -D*)
  53. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
  54. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  55. && test -z "${cf_tst_cflags}" \
  56. && cf_fix_cppflags=yes
  57. if test $cf_fix_cppflags = yes ; then
  58. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  59. continue
  60. elif test "${cf_tst_cflags}" = "\"'" ; then
  61. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  62. continue
  63. fi
  64. ;;
  65. esac
  66. case "$CPPFLAGS" in
  67. *$cf_add_cflags) #(vi
  68. ;;
  69. *) #(vi
  70. case $cf_add_cflags in #(vi
  71. -D*)
  72. cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
  73. CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags)
  74. ;;
  75. esac
  76. cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
  77. ;;
  78. esac
  79. ;;
  80. *)
  81. cf_new_cflags="$cf_new_cflags $cf_add_cflags"
  82. ;;
  83. esac
  84. ;;
  85. yes)
  86. cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
  87. cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'`
  88. test "${cf_add_cflags}" != "${cf_tst_cflags}" \
  89. && test -z "${cf_tst_cflags}" \
  90. && cf_fix_cppflags=no
  91. ;;
  92. esac
  93. done
  94. if test -n "$cf_new_cflags" ; then
  95. ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)])
  96. CFLAGS="$CFLAGS $cf_new_cflags"
  97. fi
  98. if test -n "$cf_new_cppflags" ; then
  99. ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
  100. CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
  101. fi
  102. if test -n "$cf_new_extra_cppflags" ; then
  103. ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])
  104. EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
  105. fi
  106. AC_SUBST(EXTRA_CPPFLAGS)
  107. ])dnl
  108. dnl ---------------------------------------------------------------------------
  109. dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34
  110. dnl ----------------
  111. dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
  112. dnl in the sharutils 4.2 distribution.
  113. AC_DEFUN([CF_ANSI_CC_CHECK],
  114. [
  115. AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C, cf_cv_ansi_cc,[
  116. cf_cv_ansi_cc=no
  117. cf_save_CFLAGS="$CFLAGS"
  118. cf_save_CPPFLAGS="$CPPFLAGS"
  119. # Don't try gcc -ansi; that turns off useful extensions and
  120. # breaks some systems' header files.
  121. # AIX -qlanglvl=ansi
  122. # Ultrix and OSF/1 -std1
  123. # HP-UX -Aa -D_HPUX_SOURCE
  124. # SVR4 -Xc
  125. # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
  126. for cf_arg in "-DCC_HAS_PROTOS" \
  127. "" \
  128. -qlanglvl=ansi \
  129. -std1 \
  130. -Ae \
  131. "-Aa -D_HPUX_SOURCE" \
  132. -Xc
  133. do
  134. CF_ADD_CFLAGS($cf_arg)
  135. AC_TRY_COMPILE(
  136. [
  137. #ifndef CC_HAS_PROTOS
  138. #if !defined(__STDC__) || (__STDC__ != 1)
  139. choke me
  140. #endif
  141. #endif
  142. ],[
  143. int test (int i, double x);
  144. struct s1 {int (*f) (int a);};
  145. struct s2 {int (*f) (double a);};],
  146. [cf_cv_ansi_cc="$cf_arg"; break])
  147. done
  148. CFLAGS="$cf_save_CFLAGS"
  149. CPPFLAGS="$cf_save_CPPFLAGS"
  150. ])
  151. if test "$cf_cv_ansi_cc" != "no"; then
  152. if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
  153. CF_ADD_CFLAGS($cf_cv_ansi_cc)
  154. else
  155. AC_DEFINE(CC_HAS_PROTOS)
  156. fi
  157. fi
  158. ])dnl
  159. dnl ---------------------------------------------------------------------------
  160. dnl CF_ANSI_CC_REQD version: 4 updated: 2008/03/23 14:48:54
  161. dnl ---------------
  162. dnl For programs that must use an ANSI compiler, obtain compiler options that
  163. dnl will make it recognize prototypes. We'll do preprocessor checks in other
  164. dnl macros, since tools such as unproto can fake prototypes, but only part of
  165. dnl the preprocessor.
  166. AC_DEFUN([CF_ANSI_CC_REQD],
  167. [AC_REQUIRE([CF_ANSI_CC_CHECK])
  168. if test "$cf_cv_ansi_cc" = "no"; then
  169. AC_MSG_ERROR(
  170. [Your compiler does not appear to recognize prototypes.
  171. You have the following choices:
  172. a. adjust your compiler options
  173. b. get an up-to-date compiler
  174. c. use a wrapper such as unproto])
  175. fi
  176. ])dnl
  177. dnl ---------------------------------------------------------------------------
  178. dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
  179. dnl --------------
  180. dnl Allow user to disable a normally-on option.
  181. AC_DEFUN([CF_ARG_DISABLE],
  182. [CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
  183. dnl ---------------------------------------------------------------------------
  184. dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42
  185. dnl -------------
  186. dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
  187. dnl values.
  188. dnl
  189. dnl Parameters:
  190. dnl $1 = option name
  191. dnl $2 = help-string
  192. dnl $3 = action to perform if option is not default
  193. dnl $4 = action if perform if option is default
  194. dnl $5 = default option value (either 'yes' or 'no')
  195. AC_DEFUN([CF_ARG_OPTION],
  196. [AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes)
  197. if test "$enableval" != "$5" ; then
  198. ifelse([$3],,[ :]dnl
  199. ,[ $3]) ifelse([$4],,,[
  200. else
  201. $4])
  202. fi],[enableval=$5 ifelse([$4],,,[
  203. $4
  204. ])dnl
  205. ])])dnl
  206. dnl ---------------------------------------------------------------------------
  207. dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
  208. dnl --------------
  209. dnl Check if we're accidentally using a cache from a different machine.
  210. dnl Derive the system name, as a check for reusing the autoconf cache.
  211. dnl
  212. dnl If we've packaged config.guess and config.sub, run that (since it does a
  213. dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow
  214. dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
  215. dnl which is useful in cross-compiles.
  216. dnl
  217. dnl Note: we would use $ac_config_sub, but that is one of the places where
  218. dnl autoconf 2.5x broke compatibility with autoconf 2.13
  219. AC_DEFUN([CF_CHECK_CACHE],
  220. [
  221. if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
  222. ifelse([$1],,[AC_CANONICAL_HOST],[$1])
  223. system_name="$host_os"
  224. else
  225. system_name="`(uname -s -r) 2>/dev/null`"
  226. if test -z "$system_name" ; then
  227. system_name="`(hostname) 2>/dev/null`"
  228. fi
  229. fi
  230. test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
  231. AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
  232. test -z "$system_name" && system_name="$cf_cv_system_name"
  233. test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
  234. if test ".$system_name" != ".$cf_cv_system_name" ; then
  235. AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
  236. AC_MSG_ERROR("Please remove config.cache and try again.")
  237. fi
  238. ])dnl
  239. dnl ---------------------------------------------------------------------------
  240. dnl CF_DISABLE_ECHO version: 11 updated: 2009/12/13 13:16:57
  241. dnl ---------------
  242. dnl You can always use "make -n" to see the actual options, but it's hard to
  243. dnl pick out/analyze warning messages when the compile-line is long.
  244. dnl
  245. dnl Sets:
  246. dnl ECHO_LT - symbol to control if libtool is verbose
  247. dnl ECHO_LD - symbol to prefix "cc -o" lines
  248. dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
  249. dnl SHOW_CC - symbol to put before explicit "cc -c" lines
  250. dnl ECHO_CC - symbol to put before any "cc" line
  251. dnl
  252. AC_DEFUN([CF_DISABLE_ECHO],[
  253. AC_MSG_CHECKING(if you want to see long compiling messages)
  254. CF_ARG_DISABLE(echo,
  255. [ --disable-echo display "compiling" commands],
  256. [
  257. ECHO_LT='--silent'
  258. ECHO_LD='@echo linking [$]@;'
  259. RULE_CC='@echo compiling [$]<'
  260. SHOW_CC='@echo compiling [$]@'
  261. ECHO_CC='@'
  262. ],[
  263. ECHO_LT=''
  264. ECHO_LD=''
  265. RULE_CC=''
  266. SHOW_CC=''
  267. ECHO_CC=''
  268. ])
  269. AC_MSG_RESULT($enableval)
  270. AC_SUBST(ECHO_LT)
  271. AC_SUBST(ECHO_LD)
  272. AC_SUBST(RULE_CC)
  273. AC_SUBST(SHOW_CC)
  274. AC_SUBST(ECHO_CC)
  275. ])dnl
  276. dnl ---------------------------------------------------------------------------
  277. dnl CF_DISABLE_LEAKS version: 5 updated: 2010/03/13 15:14:55
  278. dnl ----------------
  279. dnl Combine no-leak checks with the libraries or tools that are used for the
  280. dnl checks.
  281. AC_DEFUN([CF_DISABLE_LEAKS],[
  282. AC_REQUIRE([CF_WITH_DMALLOC])
  283. AC_REQUIRE([CF_WITH_DBMALLOC])
  284. AC_REQUIRE([CF_WITH_VALGRIND])
  285. AC_MSG_CHECKING(if you want to perform memory-leak testing)
  286. AC_ARG_ENABLE(leaks,
  287. [ --disable-leaks test: free permanent memory, analyze leaks],
  288. [if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi],
  289. : ${with_no_leaks:=no})
  290. AC_MSG_RESULT($with_no_leaks)
  291. if test "$with_no_leaks" = yes ; then
  292. AC_DEFINE(NO_LEAKS)
  293. fi
  294. ])dnl
  295. dnl ---------------------------------------------------------------------------
  296. dnl CF_GCC_ATTRIBUTES version: 13 updated: 2009/08/11 20:19:56
  297. dnl -----------------
  298. dnl Test for availability of useful gcc __attribute__ directives to quiet
  299. dnl compiler warnings. Though useful, not all are supported -- and contrary
  300. dnl to documentation, unrecognized directives cause older compilers to barf.
  301. AC_DEFUN([CF_GCC_ATTRIBUTES],
  302. [
  303. if test "$GCC" = yes
  304. then
  305. cat > conftest.i <<EOF
  306. #ifndef GCC_PRINTF
  307. #define GCC_PRINTF 0
  308. #endif
  309. #ifndef GCC_SCANF
  310. #define GCC_SCANF 0
  311. #endif
  312. #ifndef GCC_NORETURN
  313. #define GCC_NORETURN /* nothing */
  314. #endif
  315. #ifndef GCC_UNUSED
  316. #define GCC_UNUSED /* nothing */
  317. #endif
  318. EOF
  319. if test "$GCC" = yes
  320. then
  321. AC_CHECKING([for $CC __attribute__ directives])
  322. cat > conftest.$ac_ext <<EOF
  323. #line __oline__ "${as_me-configure}"
  324. #include "confdefs.h"
  325. #include "conftest.h"
  326. #include "conftest.i"
  327. #if GCC_PRINTF
  328. #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
  329. #else
  330. #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
  331. #endif
  332. #if GCC_SCANF
  333. #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
  334. #else
  335. #define GCC_SCANFLIKE(fmt,var) /*nothing*/
  336. #endif
  337. extern void wow(char *,...) GCC_SCANFLIKE(1,2);
  338. extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
  339. extern void foo(void) GCC_NORETURN;
  340. int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
  341. EOF
  342. cf_printf_attribute=no
  343. cf_scanf_attribute=no
  344. for cf_attribute in scanf printf unused noreturn
  345. do
  346. CF_UPPER(cf_ATTRIBUTE,$cf_attribute)
  347. cf_directive="__attribute__(($cf_attribute))"
  348. echo "checking for $CC $cf_directive" 1>&AC_FD_CC
  349. case $cf_attribute in #(vi
  350. printf) #(vi
  351. cf_printf_attribute=yes
  352. cat >conftest.h <<EOF
  353. #define GCC_$cf_ATTRIBUTE 1
  354. EOF
  355. ;;
  356. scanf) #(vi
  357. cf_scanf_attribute=yes
  358. cat >conftest.h <<EOF
  359. #define GCC_$cf_ATTRIBUTE 1
  360. EOF
  361. ;;
  362. *) #(vi
  363. cat >conftest.h <<EOF
  364. #define GCC_$cf_ATTRIBUTE $cf_directive
  365. EOF
  366. ;;
  367. esac
  368. if AC_TRY_EVAL(ac_compile); then
  369. test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
  370. cat conftest.h >>confdefs.h
  371. case $cf_attribute in #(vi
  372. printf) #(vi
  373. if test "$cf_printf_attribute" = no ; then
  374. cat >>confdefs.h <<EOF
  375. #define GCC_PRINTFLIKE(fmt,var) /* nothing */
  376. EOF
  377. else
  378. cat >>confdefs.h <<EOF
  379. #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
  380. EOF
  381. fi
  382. ;;
  383. scanf) #(vi
  384. if test "$cf_scanf_attribute" = no ; then
  385. cat >>confdefs.h <<EOF
  386. #define GCC_SCANFLIKE(fmt,var) /* nothing */
  387. EOF
  388. else
  389. cat >>confdefs.h <<EOF
  390. #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
  391. EOF
  392. fi
  393. ;;
  394. esac
  395. fi
  396. done
  397. else
  398. fgrep define conftest.i >>confdefs.h
  399. fi
  400. rm -rf conftest*
  401. fi
  402. ])dnl
  403. dnl ---------------------------------------------------------------------------
  404. dnl CF_GCC_VERSION version: 5 updated: 2010/04/24 11:02:31
  405. dnl --------------
  406. dnl Find version of gcc
  407. AC_DEFUN([CF_GCC_VERSION],[
  408. AC_REQUIRE([AC_PROG_CC])
  409. GCC_VERSION=none
  410. if test "$GCC" = yes ; then
  411. AC_MSG_CHECKING(version of $CC)
  412. GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
  413. test -z "$GCC_VERSION" && GCC_VERSION=unknown
  414. AC_MSG_RESULT($GCC_VERSION)
  415. fi
  416. ])dnl
  417. dnl ---------------------------------------------------------------------------
  418. dnl CF_GCC_WARNINGS version: 25 updated: 2010/04/24 11:03:31
  419. dnl ---------------
  420. dnl Check if the compiler supports useful warning options. There's a few that
  421. dnl we don't use, simply because they're too noisy:
  422. dnl
  423. dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
  424. dnl -Wredundant-decls (system headers make this too noisy)
  425. dnl -Wtraditional (combines too many unrelated messages, only a few useful)
  426. dnl -Wwrite-strings (too noisy, but should review occasionally). This
  427. dnl is enabled for ncurses using "--enable-const".
  428. dnl -pedantic
  429. dnl
  430. dnl Parameter:
  431. dnl $1 is an optional list of gcc warning flags that a particular
  432. dnl application might want to use, e.g., "no-unused" for
  433. dnl -Wno-unused
  434. dnl Special:
  435. dnl If $with_ext_const is "yes", add a check for -Wwrite-strings
  436. dnl
  437. AC_DEFUN([CF_GCC_WARNINGS],
  438. [
  439. AC_REQUIRE([CF_GCC_VERSION])
  440. CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
  441. cat > conftest.$ac_ext <<EOF
  442. #line __oline__ "${as_me-configure}"
  443. int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
  444. EOF
  445. if test "$INTEL_COMPILER" = yes
  446. then
  447. # The "-wdXXX" options suppress warnings:
  448. # remark #1419: external declaration in primary source file
  449. # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
  450. # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
  451. # remark #193: zero used for undefined preprocessing identifier
  452. # remark #593: variable "curs_sb_left_arrow" was set but never used
  453. # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
  454. # remark #869: parameter "tw" was never referenced
  455. # remark #981: operands are evaluated in unspecified order
  456. # warning #279: controlling expression is constant
  457. AC_CHECKING([for $CC warning options])
  458. cf_save_CFLAGS="$CFLAGS"
  459. EXTRA_CFLAGS="-Wall"
  460. for cf_opt in \
  461. wd1419 \
  462. wd1683 \
  463. wd1684 \
  464. wd193 \
  465. wd593 \
  466. wd279 \
  467. wd810 \
  468. wd869 \
  469. wd981
  470. do
  471. CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
  472. if AC_TRY_EVAL(ac_compile); then
  473. test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
  474. EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
  475. fi
  476. done
  477. CFLAGS="$cf_save_CFLAGS"
  478. elif test "$GCC" = yes
  479. then
  480. AC_CHECKING([for $CC warning options])
  481. cf_save_CFLAGS="$CFLAGS"
  482. EXTRA_CFLAGS=
  483. cf_warn_CONST=""
  484. test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
  485. for cf_opt in W Wall \
  486. Wbad-function-cast \
  487. Wcast-align \
  488. Wcast-qual \
  489. Winline \
  490. Wmissing-declarations \
  491. Wmissing-prototypes \
  492. Wnested-externs \
  493. Wpointer-arith \
  494. Wshadow \
  495. Wstrict-prototypes \
  496. Wundef $cf_warn_CONST $1
  497. do
  498. CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
  499. if AC_TRY_EVAL(ac_compile); then
  500. test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
  501. case $cf_opt in #(vi
  502. Wcast-qual) #(vi
  503. CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
  504. ;;
  505. Winline) #(vi
  506. case $GCC_VERSION in
  507. [[34]].*)
  508. CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
  509. continue;;
  510. esac
  511. ;;
  512. esac
  513. EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
  514. fi
  515. done
  516. CFLAGS="$cf_save_CFLAGS"
  517. fi
  518. rm -f conftest*
  519. AC_SUBST(EXTRA_CFLAGS)
  520. ])dnl
  521. dnl ---------------------------------------------------------------------------
  522. dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
  523. dnl -------------
  524. dnl Check if we must define _GNU_SOURCE to get a reasonable value for
  525. dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect
  526. dnl (or misfeature) of glibc2, which breaks portability of many applications,
  527. dnl since it is interwoven with GNU extensions.
  528. dnl
  529. dnl Well, yes we could work around it...
  530. AC_DEFUN([CF_GNU_SOURCE],
  531. [
  532. AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
  533. AC_TRY_COMPILE([#include <sys/types.h>],[
  534. #ifndef _XOPEN_SOURCE
  535. make an error
  536. #endif],
  537. [cf_cv_gnu_source=no],
  538. [cf_save="$CPPFLAGS"
  539. CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
  540. AC_TRY_COMPILE([#include <sys/types.h>],[
  541. #ifdef _XOPEN_SOURCE
  542. make an error
  543. #endif],
  544. [cf_cv_gnu_source=no],
  545. [cf_cv_gnu_source=yes])
  546. CPPFLAGS="$cf_save"
  547. ])
  548. ])
  549. test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
  550. ])dnl
  551. dnl ---------------------------------------------------------------------------
  552. dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42
  553. dnl -----------------
  554. dnl Check if the given compiler is really the Intel compiler for Linux. It
  555. dnl tries to imitate gcc, but does not return an error when it finds a mismatch
  556. dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK.
  557. dnl
  558. dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to
  559. dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
  560. dnl the wrappers for gcc and g++ warnings.
  561. dnl
  562. dnl $1 = GCC (default) or GXX
  563. dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
  564. dnl $3 = CFLAGS (default) or CXXFLAGS
  565. AC_DEFUN([CF_INTEL_COMPILER],[
  566. ifelse([$2],,INTEL_COMPILER,[$2])=no
  567. if test "$ifelse([$1],,[$1],GCC)" = yes ; then
  568. case $host_os in
  569. linux*|gnu*)
  570. AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler)
  571. cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
  572. ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
  573. AC_TRY_COMPILE([],[
  574. #ifdef __INTEL_COMPILER
  575. #else
  576. make an error
  577. #endif
  578. ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
  579. cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
  580. ],[])
  581. ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
  582. AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2]))
  583. ;;
  584. esac
  585. fi
  586. ])dnl
  587. dnl ---------------------------------------------------------------------------
  588. dnl CF_MAKE_TAGS version: 5 updated: 2010/04/03 20:07:32
  589. dnl ------------
  590. dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have
  591. dnl a monocase filesystem.
  592. AC_DEFUN([CF_MAKE_TAGS],[
  593. AC_REQUIRE([CF_MIXEDCASE_FILENAMES])
  594. AC_CHECK_PROGS(CTAGS, exctags ctags)
  595. AC_CHECK_PROGS(ETAGS, exetags etags)
  596. AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS-ctags}, yes, no)
  597. if test "$cf_cv_mixedcase" = yes ; then
  598. AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS-etags}, yes, no)
  599. else
  600. MAKE_UPPER_TAGS=no
  601. fi
  602. if test "$MAKE_UPPER_TAGS" = yes ; then
  603. MAKE_UPPER_TAGS=
  604. else
  605. MAKE_UPPER_TAGS="#"
  606. fi
  607. if test "$MAKE_LOWER_TAGS" = yes ; then
  608. MAKE_LOWER_TAGS=
  609. else
  610. MAKE_LOWER_TAGS="#"
  611. fi
  612. AC_SUBST(CTAGS)
  613. AC_SUBST(ETAGS)
  614. AC_SUBST(MAKE_UPPER_TAGS)
  615. AC_SUBST(MAKE_LOWER_TAGS)
  616. ])dnl
  617. dnl ---------------------------------------------------------------------------
  618. dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55
  619. dnl ----------------------
  620. dnl Check if the file-system supports mixed-case filenames. If we're able to
  621. dnl create a lowercase name and see it as uppercase, it doesn't support that.
  622. AC_DEFUN([CF_MIXEDCASE_FILENAMES],
  623. [
  624. AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
  625. if test "$cross_compiling" = yes ; then
  626. case $target_alias in #(vi
  627. *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
  628. cf_cv_mixedcase=no
  629. ;;
  630. *)
  631. cf_cv_mixedcase=yes
  632. ;;
  633. esac
  634. else
  635. rm -f conftest CONFTEST
  636. echo test >conftest
  637. if test -f CONFTEST ; then
  638. cf_cv_mixedcase=no
  639. else
  640. cf_cv_mixedcase=yes
  641. fi
  642. rm -f conftest CONFTEST
  643. fi
  644. ])
  645. test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
  646. ])dnl
  647. dnl ---------------------------------------------------------------------------
  648. dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12
  649. dnl ----------
  650. dnl Write a debug message to config.log, along with the line number in the
  651. dnl configure script.
  652. AC_DEFUN([CF_MSG_LOG],[
  653. echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
  654. ])dnl
  655. dnl ---------------------------------------------------------------------------
  656. dnl CF_NO_LEAKS_OPTION version: 4 updated: 2006/12/16 14:24:05
  657. dnl ------------------
  658. dnl see CF_WITH_NO_LEAKS
  659. AC_DEFUN([CF_NO_LEAKS_OPTION],[
  660. AC_MSG_CHECKING(if you want to use $1 for testing)
  661. AC_ARG_WITH($1,
  662. [$2],
  663. [AC_DEFINE($3)ifelse([$4],,[
  664. $4
  665. ])
  666. : ${with_cflags:=-g}
  667. : ${with_no_leaks:=yes}
  668. with_$1=yes],
  669. [with_$1=])
  670. AC_MSG_RESULT(${with_$1:-no})
  671. case .$with_cflags in #(vi
  672. .*-g*)
  673. case .$CFLAGS in #(vi
  674. .*-g*) #(vi
  675. ;;
  676. *)
  677. CF_ADD_CFLAGS([-g])
  678. ;;
  679. esac
  680. ;;
  681. esac
  682. ])dnl
  683. dnl ---------------------------------------------------------------------------
  684. dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42
  685. dnl -----------------
  686. dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
  687. dnl
  688. dnl POSIX.1-1990 _POSIX_SOURCE
  689. dnl POSIX.1-1990 and _POSIX_SOURCE and
  690. dnl POSIX.2-1992 C-Language _POSIX_C_SOURCE=2
  691. dnl Bindings Option
  692. dnl POSIX.1b-1993 _POSIX_C_SOURCE=199309L
  693. dnl POSIX.1c-1996 _POSIX_C_SOURCE=199506L
  694. dnl X/Open 2000 _POSIX_C_SOURCE=200112L
  695. dnl
  696. dnl Parameters:
  697. dnl $1 is the nominal value for _POSIX_C_SOURCE
  698. AC_DEFUN([CF_POSIX_C_SOURCE],
  699. [
  700. cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1])
  701. cf_save_CFLAGS="$CFLAGS"
  702. cf_save_CPPFLAGS="$CPPFLAGS"
  703. CF_REMOVE_DEFINE(cf_trim_CFLAGS,$cf_save_CFLAGS,_POSIX_C_SOURCE)
  704. CF_REMOVE_DEFINE(cf_trim_CPPFLAGS,$cf_save_CPPFLAGS,_POSIX_C_SOURCE)
  705. AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[
  706. CF_MSG_LOG(if the symbol is already defined go no further)
  707. AC_TRY_COMPILE([#include <sys/types.h>],[
  708. #ifndef _POSIX_C_SOURCE
  709. make an error
  710. #endif],
  711. [cf_cv_posix_c_source=no],
  712. [cf_want_posix_source=no
  713. case .$cf_POSIX_C_SOURCE in #(vi
  714. .[[12]]??*) #(vi
  715. cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
  716. ;;
  717. .2) #(vi
  718. cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
  719. cf_want_posix_source=yes
  720. ;;
  721. .*)
  722. cf_want_posix_source=yes
  723. ;;
  724. esac
  725. if test "$cf_want_posix_source" = yes ; then
  726. AC_TRY_COMPILE([#include <sys/types.h>],[
  727. #ifdef _POSIX_SOURCE
  728. make an error
  729. #endif],[],
  730. cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE")
  731. fi
  732. CF_MSG_LOG(ifdef from value $cf_POSIX_C_SOURCE)
  733. CFLAGS="$cf_trim_CFLAGS"
  734. CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
  735. CF_MSG_LOG(if the second compile does not leave our definition intact error)
  736. AC_TRY_COMPILE([#include <sys/types.h>],[
  737. #ifndef _POSIX_C_SOURCE
  738. make an error
  739. #endif],,
  740. [cf_cv_posix_c_source=no])
  741. CFLAGS="$cf_save_CFLAGS"
  742. CPPFLAGS="$cf_save_CPPFLAGS"
  743. ])
  744. ])
  745. if test "$cf_cv_posix_c_source" != no ; then
  746. CFLAGS="$cf_trim_CFLAGS"
  747. CPPFLAGS="$cf_trim_CPPFLAGS"
  748. CF_ADD_CFLAGS($cf_cv_posix_c_source)
  749. fi
  750. ])dnl
  751. dnl ---------------------------------------------------------------------------
  752. dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
  753. dnl -----------
  754. dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
  755. AC_DEFUN([CF_PROG_EXT],
  756. [
  757. AC_REQUIRE([CF_CHECK_CACHE])
  758. case $cf_cv_system_name in
  759. os2*)
  760. CFLAGS="$CFLAGS -Zmt"
  761. CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
  762. CXXFLAGS="$CXXFLAGS -Zmt"
  763. # autoconf's macro sets -Zexe and suffix both, which conflict:w
  764. LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
  765. ac_cv_exeext=.exe
  766. ;;
  767. esac
  768. AC_EXEEXT
  769. AC_OBJEXT
  770. PROG_EXT="$EXEEXT"
  771. AC_SUBST(PROG_EXT)
  772. test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
  773. ])dnl
  774. dnl ---------------------------------------------------------------------------
  775. dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14
  776. dnl ------------
  777. AC_DEFUN([CF_PROG_LINT],
  778. [
  779. AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint)
  780. AC_SUBST(LINT_OPTS)
  781. ])dnl
  782. dnl ---------------------------------------------------------------------------
  783. dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
  784. dnl ----------------
  785. dnl Remove all -U and -D options that refer to the given symbol from a list
  786. dnl of C compiler options. This works around the problem that not all
  787. dnl compilers process -U and -D options from left-to-right, so a -U option
  788. dnl cannot be used to cancel the effect of a preceding -D option.
  789. dnl
  790. dnl $1 = target (which could be the same as the source variable)
  791. dnl $2 = source (including '$')
  792. dnl $3 = symbol to remove
  793. define([CF_REMOVE_DEFINE],
  794. [
  795. $1=`echo "$2" | \
  796. sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \
  797. -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
  798. ])dnl
  799. dnl ---------------------------------------------------------------------------
  800. dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
  801. dnl --------
  802. dnl Make an uppercase version of a variable
  803. dnl $1=uppercase($2)
  804. AC_DEFUN([CF_UPPER],
  805. [
  806. $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  807. ])dnl
  808. dnl ---------------------------------------------------------------------------
  809. dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12
  810. dnl ----------
  811. dnl Use AC_VERBOSE w/o the warnings
  812. AC_DEFUN([CF_VERBOSE],
  813. [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
  814. CF_MSG_LOG([$1])
  815. ])dnl
  816. dnl ---------------------------------------------------------------------------
  817. dnl CF_WITH_DBMALLOC version: 6 updated: 2006/12/16 14:24:05
  818. dnl ----------------
  819. dnl Configure-option for dbmalloc. The optional parameter is used to override
  820. dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
  821. AC_DEFUN([CF_WITH_DBMALLOC],[
  822. CF_NO_LEAKS_OPTION(dbmalloc,
  823. [ --with-dbmalloc test: use Conor Cahill's dbmalloc library],
  824. [USE_DBMALLOC])
  825. if test "$with_dbmalloc" = yes ; then
  826. AC_CHECK_HEADER(dbmalloc.h,
  827. [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse($1,,[],[,$1]))])
  828. fi
  829. ])dnl
  830. dnl ---------------------------------------------------------------------------
  831. dnl CF_WITH_DMALLOC version: 6 updated: 2006/12/16 14:24:05
  832. dnl ---------------
  833. dnl Configure-option for dmalloc. The optional parameter is used to override
  834. dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
  835. AC_DEFUN([CF_WITH_DMALLOC],[
  836. CF_NO_LEAKS_OPTION(dmalloc,
  837. [ --with-dmalloc test: use Gray Watson's dmalloc library],
  838. [USE_DMALLOC])
  839. if test "$with_dmalloc" = yes ; then
  840. AC_CHECK_HEADER(dmalloc.h,
  841. [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse($1,,[],[,$1]))])
  842. fi
  843. ])dnl
  844. dnl ---------------------------------------------------------------------------
  845. dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21
  846. dnl ----------------
  847. AC_DEFUN([CF_WITH_VALGRIND],[
  848. CF_NO_LEAKS_OPTION(valgrind,
  849. [ --with-valgrind test: use valgrind],
  850. [USE_VALGRIND])
  851. ])dnl
  852. dnl ---------------------------------------------------------------------------
  853. dnl CF_WITH_WARNINGS version: 5 updated: 2004/07/23 14:40:34
  854. dnl ----------------
  855. dnl Combine the checks for gcc features into a configure-script option
  856. dnl
  857. dnl Parameters:
  858. dnl $1 - see CF_GCC_WARNINGS
  859. AC_DEFUN([CF_WITH_WARNINGS],
  860. [
  861. if ( test "$GCC" = yes || test "$GXX" = yes )
  862. then
  863. AC_MSG_CHECKING(if you want to check for gcc warnings)
  864. AC_ARG_WITH(warnings,
  865. [ --with-warnings test: turn on gcc warnings],
  866. [cf_opt_with_warnings=$withval],
  867. [cf_opt_with_warnings=no])
  868. AC_MSG_RESULT($cf_opt_with_warnings)
  869. if test "$cf_opt_with_warnings" != no ; then
  870. CF_GCC_ATTRIBUTES
  871. CF_GCC_WARNINGS([$1])
  872. fi
  873. fi
  874. ])dnl
  875. dnl ---------------------------------------------------------------------------
  876. dnl CF_XOPEN_SOURCE version: 34 updated: 2010/05/26 05:38:42
  877. dnl ---------------
  878. dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
  879. dnl or adapt to the vendor's definitions to get equivalent functionality,
  880. dnl without losing the common non-POSIX features.
  881. dnl
  882. dnl Parameters:
  883. dnl $1 is the nominal value for _XOPEN_SOURCE
  884. dnl $2 is the nominal value for _POSIX_C_SOURCE
  885. AC_DEFUN([CF_XOPEN_SOURCE],[
  886. cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
  887. cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
  888. cf_xopen_source=
  889. case $host_os in #(vi
  890. aix[[456]]*) #(vi
  891. cf_xopen_source="-D_ALL_SOURCE"
  892. ;;
  893. darwin[[0-8]].*) #(vi
  894. cf_xopen_source="-D_APPLE_C_SOURCE"
  895. ;;
  896. darwin*) #(vi
  897. cf_xopen_source="-D_DARWIN_C_SOURCE"
  898. ;;
  899. freebsd*|dragonfly*) #(vi
  900. # 5.x headers associate
  901. # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
  902. # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
  903. cf_POSIX_C_SOURCE=200112L
  904. cf_XOPEN_SOURCE=600
  905. cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
  906. ;;
  907. hpux11*) #(vi
  908. cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
  909. ;;
  910. hpux*) #(vi
  911. cf_xopen_source="-D_HPUX_SOURCE"
  912. ;;
  913. irix[[56]].*) #(vi
  914. cf_xopen_source="-D_SGI_SOURCE"
  915. ;;
  916. linux*|gnu*|mint*|k*bsd*-gnu) #(vi
  917. CF_GNU_SOURCE
  918. ;;
  919. mirbsd*) #(vi
  920. # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
  921. ;;
  922. netbsd*) #(vi
  923. # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
  924. ;;
  925. openbsd*) #(vi
  926. # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
  927. ;;
  928. osf[[45]]*) #(vi
  929. cf_xopen_source="-D_OSF_SOURCE"
  930. ;;
  931. nto-qnx*) #(vi
  932. cf_xopen_source="-D_QNX_SOURCE"
  933. ;;
  934. sco*) #(vi
  935. # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
  936. ;;
  937. solaris2.1[[0-9]]) #(vi
  938. cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
  939. ;;
  940. solaris2.[[1-9]]) #(vi
  941. cf_xopen_source="-D__EXTENSIONS__"
  942. ;;
  943. *)
  944. AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
  945. AC_TRY_COMPILE([#include <sys/types.h>],[
  946. #ifndef _XOPEN_SOURCE
  947. make an error
  948. #endif],
  949. [cf_cv_xopen_source=no],
  950. [cf_save="$CPPFLAGS"
  951. CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
  952. AC_TRY_COMPILE([#include <sys/types.h>],[
  953. #ifdef _XOPEN_SOURCE
  954. make an error
  955. #endif],
  956. [cf_cv_xopen_source=no],
  957. [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
  958. CPPFLAGS="$cf_save"
  959. ])
  960. ])
  961. if test "$cf_cv_xopen_source" != no ; then
  962. CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
  963. CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
  964. cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
  965. CF_ADD_CFLAGS($cf_temp_xopen_source)
  966. fi
  967. CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
  968. ;;
  969. esac
  970. if test -n "$cf_xopen_source" ; then
  971. CF_ADD_CFLAGS($cf_xopen_source)
  972. fi
  973. ])