acinclude.m4
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:30k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. # Local macros for automake & autoconf
  2. # A local version of AC_CHECK_SIZEOF that includes sys/types.h
  3. dnl MYSQL_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
  4. AC_DEFUN(MYSQL_CHECK_SIZEOF,
  5. [changequote(<<, >>)dnl
  6. dnl The name to #define.
  7. define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
  8. dnl The cache variable name.
  9. define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
  10. changequote([, ])dnl
  11. AC_MSG_CHECKING(size of $1)
  12. AC_CACHE_VAL(AC_CV_NAME,
  13. [AC_TRY_RUN([#include <stdio.h>
  14. #include <sys/types.h>
  15. #if STDC_HEADERS
  16. #include <stdlib.h>
  17. #include <stddef.h>
  18. #endif
  19. main()
  20. {
  21.   FILE *f=fopen("conftestval", "w");
  22.   if (!f) exit(1);
  23.   fprintf(f, "%dn", sizeof($1));
  24.   exit(0);
  25. }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
  26. AC_MSG_RESULT($AC_CV_NAME)
  27. AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
  28. undefine([AC_TYPE_NAME])dnl
  29. undefine([AC_CV_NAME])dnl
  30. ])
  31. #---START: Used in for client configure
  32. AC_DEFUN(MYSQL_TYPE_ACCEPT,
  33. [ac_save_CXXFLAGS="$CXXFLAGS"
  34. AC_CACHE_CHECK([base type of last arg to accept], mysql_cv_btype_last_arg_accept,
  35. AC_LANG_SAVE
  36. AC_LANG_CPLUSPLUS
  37. if test "$ac_cv_prog_gxx" = "yes"
  38. then
  39.   CXXFLAGS="$CXXFLAGS -Werror"
  40. fi
  41. mysql_cv_btype_last_arg_accept=none
  42. [AC_TRY_COMPILE([#if defined(inline)
  43. #undef inline
  44. #endif
  45. #include <stdlib.h>
  46. #include <sys/types.h>
  47. #include <sys/socket.h>
  48. ],
  49. [int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0); return (a != 0);],
  50. mysql_cv_btype_last_arg_accept=socklen_t)]
  51. if test $mysql_cv_btype_last_arg_accept = none; then
  52. [AC_TRY_COMPILE([#if defined(inline)
  53. #undef inline
  54. #endif
  55. #include <stdlib.h>
  56. #include <sys/types.h>
  57. #include <sys/socket.h>
  58. ],
  59. [int a = accept(1, (struct sockaddr *) 0, (size_t *) 0); return (a != 0);],
  60. mysql_cv_btype_last_arg_accept=size_t)]
  61. fi
  62. if test $mysql_cv_btype_last_arg_accept = none; then
  63. mysql_cv_btype_last_arg_accept=int
  64. fi)
  65. AC_LANG_RESTORE
  66. AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $mysql_cv_btype_last_arg_accept)
  67. CXXFLAGS="$ac_save_CXXFLAGS"
  68. ])
  69. #---END:
  70. dnl Find type of qsort
  71. AC_DEFUN(MYSQL_TYPE_QSORT,
  72. [AC_CACHE_CHECK([return type of qsort], mysql_cv_type_qsort,
  73. [AC_TRY_COMPILE([#include <stdlib.h>
  74. #ifdef __cplusplus
  75. extern "C"
  76. #endif
  77. void qsort(void *base, size_t nel, size_t width,
  78.  int (*compar) (const void *, const void *));
  79. ],
  80. [int i;], mysql_cv_type_qsort=void, mysql_cv_type_qsort=int)])
  81. AC_DEFINE_UNQUOTED(RETQSORTTYPE, $mysql_cv_type_qsort)
  82. if test "$mysql_cv_type_qsort" = "void"
  83. then
  84.  AC_DEFINE_UNQUOTED(QSORT_TYPE_IS_VOID, 1)
  85. fi
  86. ])
  87. AC_DEFUN(MYSQL_TIMESPEC_TS,
  88. [AC_CACHE_CHECK([if struct timespec has a ts_sec member], mysql_cv_timespec_ts,
  89. [AC_TRY_COMPILE([#include <pthread.h>
  90. #ifdef __cplusplus
  91. extern "C"
  92. #endif
  93. ],
  94. [struct timespec abstime;
  95. abstime.ts_sec = time(NULL)+1;
  96. abstime.ts_nsec = 0;
  97. ], mysql_cv_timespec_ts=yes, mysql_cv_timespec_ts=no)])
  98. if test "$mysql_cv_timespec_ts" = "yes"
  99. then
  100.   AC_DEFINE(HAVE_TIMESPEC_TS_SEC)
  101. fi
  102. ])
  103. AC_DEFUN(MYSQL_TZNAME,
  104. [AC_CACHE_CHECK([if we have tzname variable], mysql_cv_tzname,
  105. [AC_TRY_COMPILE([#include <time.h>
  106. #ifdef __cplusplus
  107. extern "C"
  108. #endif
  109. ],
  110. [ tzset();
  111.   return tzname[0] != 0;
  112. ], mysql_cv_tzname=yes, mysql_cv_tzname=no)])
  113. if test "$mysql_cv_tzname" = "yes"
  114. then
  115.   AC_DEFINE(HAVE_TZNAME)
  116. fi
  117. ])
  118. AC_DEFUN(MYSQL_CHECK_ZLIB_WITH_COMPRESS, [
  119. save_LIBS="$LIBS"
  120. LIBS="-l$1 $LIBS"
  121. AC_CACHE_CHECK([if libz with compress], mysql_cv_compress,
  122. [AC_TRY_LINK([#include <zlib.h>
  123. #ifdef __cplusplus
  124. extern "C"
  125. #endif
  126. ],
  127. [ return compress(0, (unsigned long*) 0, "", 0);
  128. ], mysql_cv_compress=yes, mysql_cv_compress=no)])
  129. if test "$mysql_cv_compress" = "yes"
  130. then
  131.   AC_DEFINE(HAVE_COMPRESS)
  132. else
  133.   LIBS="$save_LIBS"
  134. fi
  135. ])
  136. #---START: Used in for client configure
  137. AC_DEFUN(MYSQL_CHECK_ULONG,
  138. [AC_MSG_CHECKING(for type ulong)
  139. AC_CACHE_VAL(ac_cv_ulong,
  140. [AC_TRY_RUN([#include <stdio.h>
  141. #include <sys/types.h>
  142. main()
  143. {
  144.   ulong foo;
  145.   foo++;
  146.   exit(0);
  147. }], ac_cv_ulong=yes, ac_cv_ulong=no, ac_cv_ulong=no)])
  148. AC_MSG_RESULT($ac_cv_ulong)
  149. if test "$ac_cv_ulong" = "yes"
  150. then
  151.   AC_DEFINE(HAVE_ULONG)
  152. fi
  153. ])
  154. AC_DEFUN(MYSQL_CHECK_UCHAR,
  155. [AC_MSG_CHECKING(for type uchar)
  156. AC_CACHE_VAL(ac_cv_uchar,
  157. [AC_TRY_RUN([#include <stdio.h>
  158. #include <sys/types.h>
  159. main()
  160. {
  161.   uchar foo;
  162.   foo++;
  163.   exit(0);
  164. }], ac_cv_uchar=yes, ac_cv_uchar=no, ac_cv_uchar=no)])
  165. AC_MSG_RESULT($ac_cv_uchar)
  166. if test "$ac_cv_uchar" = "yes"
  167. then
  168.   AC_DEFINE(HAVE_UCHAR)
  169. fi
  170. ])
  171. AC_DEFUN(MYSQL_CHECK_UINT,
  172. [AC_MSG_CHECKING(for type uint)
  173. AC_CACHE_VAL(ac_cv_uint,
  174. [AC_TRY_RUN([#include <stdio.h>
  175. #include <sys/types.h>
  176. main()
  177. {
  178.   uint foo;
  179.   foo++;
  180.   exit(0);
  181. }], ac_cv_uint=yes, ac_cv_uint=no, ac_cv_uint=no)])
  182. AC_MSG_RESULT($ac_cv_uint)
  183. if test "$ac_cv_uint" = "yes"
  184. then
  185.   AC_DEFINE(HAVE_UINT)
  186. fi
  187. ])
  188. #---END:
  189. AC_DEFUN(MYSQL_CHECK_FP_EXCEPT,
  190. [AC_MSG_CHECKING(for type fp_except)
  191. AC_CACHE_VAL(ac_cv_fp_except,
  192. [AC_TRY_RUN([#include <stdio.h>
  193. #include <sys/types.h>
  194. #include <ieeefp.h>
  195. main()
  196. {
  197.   fp_except foo;
  198.   foo++;
  199.   exit(0);
  200. }], ac_cv_fp_except=yes, ac_cv_fp_except=no, ac_cv_fp_except=no)])
  201. AC_MSG_RESULT($ac_cv_fp_except)
  202. if test "$ac_cv_fp_except" = "yes"
  203. then
  204.   AC_DEFINE(HAVE_FP_EXCEPT)
  205. fi
  206. ])
  207. # From fileutils-3.14/aclocal.m4
  208. # @defmac AC_PROG_CC_STDC
  209. # @maindex PROG_CC_STDC
  210. # @ovindex CC
  211. # If the C compiler in not in ANSI C mode by default, try to add an option
  212. # to output variable @code{CC} to make it so.  This macro tries various
  213. # options that select ANSI C on some system or another.  It considers the
  214. # compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
  215. # handles function prototypes correctly.
  216. #
  217. # Patched by monty to only check if __STDC__ is defined. With the original 
  218. # check it's impossible to get things to work with the Sunpro compiler from
  219. # Workshop 4.2
  220. #
  221. # If you use this macro, you should check after calling it whether the C
  222. # compiler has been set to accept ANSI C; if not, the shell variable
  223. # @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
  224. # code in ANSI C, you can make an un-ANSIfied copy of it by using the
  225. # program @code{ansi2knr}, which comes with Ghostscript.
  226. # @end defmac
  227. AC_DEFUN(AM_PROG_CC_STDC,
  228. [AC_REQUIRE([AC_PROG_CC])
  229. AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
  230. AC_CACHE_VAL(am_cv_prog_cc_stdc,
  231. [am_cv_prog_cc_stdc=no
  232. ac_save_CC="$CC"
  233. # Don't try gcc -ansi; that turns off useful extensions and
  234. # breaks some systems' header files.
  235. # AIX -qlanglvl=ansi
  236. # Ultrix and OSF/1 -std1
  237. # HP-UX -Aa -D_HPUX_SOURCE
  238. # SVR4 -Xc -D__EXTENSIONS__
  239. # removed "-Xc -D__EXTENSIONS__" beacause sun c++ does not like it.
  240. for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" 
  241. do
  242.   CC="$ac_save_CC $ac_arg"
  243.   AC_TRY_COMPILE(
  244. [#if !defined(__STDC__)
  245. choke me
  246. #endif
  247. /* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
  248. #ifdef _SEQUENT_
  249. # include <sys/types.h>
  250. # include <sys/stat.h>
  251. #endif
  252. ], [
  253. int test (int i, double x);
  254. struct s1 {int (*f) (int a);};
  255. struct s2 {int (*f) (double a);};],
  256. [am_cv_prog_cc_stdc="$ac_arg"; break])
  257. done
  258. CC="$ac_save_CC"
  259. ])
  260. AC_MSG_RESULT($am_cv_prog_cc_stdc)
  261. case "x$am_cv_prog_cc_stdc" in
  262.   x|xno) ;;
  263.   *) CC="$CC $am_cv_prog_cc_stdc" ;;
  264. esac
  265. ])
  266. # serial 1
  267. AC_DEFUN(AM_PROG_INSTALL,
  268. [AC_REQUIRE([AC_PROG_INSTALL])
  269. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  270. AC_SUBST(INSTALL_SCRIPT)dnl
  271. ])
  272. #
  273. # Check to make sure that the build environment is sane.
  274. #
  275. AC_DEFUN(AM_SANITY_CHECK,
  276. [AC_MSG_CHECKING([whether build environment is sane])
  277. sleep 1
  278. echo timestamp > conftestfile
  279. # Do this in a subshell so we don't clobber the current shell's
  280. # arguments.  FIXME: maybe try `-L' hack like GETLOADAVG test?
  281. if (set X `ls -t $srcdir/configure conftestfile`; test "[$]2" = conftestfile)
  282. then
  283.    # Ok.
  284.    :
  285. else
  286.    AC_MSG_ERROR([newly created file is older than distributed files!
  287. Check your system clock])
  288. fi
  289. rm -f conftest*
  290. AC_MSG_RESULT(yes)])
  291. # Orginal from bash-2.0 aclocal.m4, Changed to use termcap last by monty.
  292.  
  293. AC_DEFUN(MYSQL_CHECK_LIB_TERMCAP,
  294. [
  295. AC_CACHE_VAL(mysql_cv_termcap_lib,
  296. [AC_CHECK_LIB(ncurses, tgetent, mysql_cv_termcap_lib=libncurses,
  297.     [AC_CHECK_LIB(curses, tgetent, mysql_cv_termcap_lib=libcurses,
  298. [AC_CHECK_LIB(termcap, tgetent, mysql_cv_termcap_lib=libtermcap,
  299.     mysql_cv_termcap_lib=NOT_FOUND)])])])
  300. AC_MSG_CHECKING(for termcap functions library)
  301. if test $mysql_cv_termcap_lib = NOT_FOUND; then
  302. AC_MSG_ERROR([No curses/termcap library found])
  303. elif test $mysql_cv_termcap_lib = libtermcap; then
  304. TERMCAP_LIB=-ltermcap
  305. elif test $mysql_cv_termcap_lib = libncurses; then
  306. TERMCAP_LIB=-lncurses
  307. else
  308. TERMCAP_LIB=-lcurses
  309. fi
  310. AC_MSG_RESULT($TERMCAP_LIB)
  311. ])
  312. dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
  313. AC_DEFUN(MYSQL_SIGNAL_CHECK,
  314. [AC_REQUIRE([AC_TYPE_SIGNAL])
  315. AC_MSG_CHECKING(for type of signal functions)
  316. AC_CACHE_VAL(mysql_cv_signal_vintage,
  317. [
  318.   AC_TRY_LINK([#include <signal.h>],[
  319.     sigset_t ss;
  320.     struct sigaction sa;
  321.     sigemptyset(&ss); sigsuspend(&ss);
  322.     sigaction(SIGINT, &sa, (struct sigaction *) 0);
  323.     sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
  324.   ], mysql_cv_signal_vintage=posix,
  325.   [
  326.     AC_TRY_LINK([#include <signal.h>], [
  327. int mask = sigmask(SIGINT);
  328. sigsetmask(mask); sigblock(mask); sigpause(mask);
  329.     ], mysql_cv_signal_vintage=4.2bsd,
  330.     [
  331.       AC_TRY_LINK([
  332. #include <signal.h>
  333. RETSIGTYPE foo() { }], [
  334. int mask = sigmask(SIGINT);
  335. sigset(SIGINT, foo); sigrelse(SIGINT);
  336. sighold(SIGINT); sigpause(SIGINT);
  337.         ], mysql_cv_signal_vintage=svr3, mysql_cv_signal_vintage=v7
  338.     )]
  339.   )]
  340. )
  341. ])
  342. AC_MSG_RESULT($mysql_cv_signal_vintage)
  343. if test "$mysql_cv_signal_vintage" = posix; then
  344. AC_DEFINE(HAVE_POSIX_SIGNALS)
  345. elif test "$mysql_cv_signal_vintage" = "4.2bsd"; then
  346. AC_DEFINE(HAVE_BSD_SIGNALS)
  347. elif test "$mysql_cv_signal_vintage" = svr3; then
  348. AC_DEFINE(HAVE_USG_SIGHOLD)
  349. fi
  350. ])
  351. AC_DEFUN(MYSQL_CHECK_GETPW_FUNCS,
  352. [AC_MSG_CHECKING(whether programs are able to redeclare getpw functions)
  353. AC_CACHE_VAL(mysql_cv_can_redecl_getpw,
  354. [AC_TRY_COMPILE([#include <sys/types.h>
  355. #include <pwd.h>
  356. extern struct passwd *getpwent();], [struct passwd *z; z = getpwent();],
  357.   mysql_cv_can_redecl_getpw=yes,mysql_cv_can_redecl_getpw=no)])
  358. AC_MSG_RESULT($mysql_cv_can_redecl_getpw)
  359. if test $mysql_cv_can_redecl_getpw = no; then
  360. AC_DEFINE(HAVE_GETPW_DECLS)
  361. fi
  362. ])
  363. AC_DEFUN(MYSQL_HAVE_TIOCGWINSZ,
  364. [AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
  365. AC_CACHE_VAL(mysql_cv_tiocgwinsz_in_ioctl,
  366. [AC_TRY_COMPILE([#include <sys/types.h>
  367. #include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
  368.   mysql_cv_tiocgwinsz_in_ioctl=yes,mysql_cv_tiocgwinsz_in_ioctl=no)])
  369. AC_MSG_RESULT($mysql_cv_tiocgwinsz_in_ioctl)
  370. if test $mysql_cv_tiocgwinsz_in_ioctl = yes; then   
  371. AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
  372. fi
  373. ])
  374. AC_DEFUN(MYSQL_HAVE_FIONREAD,
  375. [AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
  376. AC_CACHE_VAL(mysql_cv_fionread_in_ioctl,
  377. [AC_TRY_COMPILE([#include <sys/types.h>
  378. #include <sys/ioctl.h>], [int x = FIONREAD;],
  379.   mysql_cv_fionread_in_ioctl=yes,mysql_cv_fionread_in_ioctl=no)])
  380. AC_MSG_RESULT($mysql_cv_fionread_in_ioctl)
  381. if test $mysql_cv_fionread_in_ioctl = yes; then   
  382. AC_DEFINE(FIONREAD_IN_SYS_IOCTL)
  383. fi
  384. ])
  385. AC_DEFUN(MYSQL_HAVE_TIOCSTAT,
  386. [AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
  387. AC_CACHE_VAL(mysql_cv_tiocstat_in_ioctl,
  388. [AC_TRY_COMPILE([#include <sys/types.h>
  389. #include <sys/ioctl.h>], [int x = TIOCSTAT;],
  390.   mysql_cv_tiocstat_in_ioctl=yes,mysql_cv_tiocstat_in_ioctl=no)])
  391. AC_MSG_RESULT($mysql_cv_tiocstat_in_ioctl)
  392. if test $mysql_cv_tiocstat_in_ioctl = yes; then   
  393. AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL)
  394. fi
  395. ])
  396. AC_DEFUN(MYSQL_STRUCT_DIRENT_D_INO,
  397. [AC_REQUIRE([AC_HEADER_DIRENT])
  398. AC_MSG_CHECKING(if struct dirent has a d_ino member)
  399. AC_CACHE_VAL(mysql_cv_dirent_has_dino,
  400. [AC_TRY_COMPILE([
  401. #include <stdio.h>
  402. #include <sys/types.h>
  403. #ifdef HAVE_UNISTD_H
  404. # include <unistd.h>
  405. #endif /* HAVE_UNISTD_H */
  406. #if defined(HAVE_DIRENT_H)
  407. # include <dirent.h>
  408. #else
  409. # define dirent direct
  410. # ifdef HAVE_SYS_NDIR_H
  411. #  include <sys/ndir.h>
  412. # endif /* SYSNDIR */
  413. # ifdef HAVE_SYS_DIR_H
  414. #  include <sys/dir.h>
  415. # endif /* SYSDIR */
  416. # ifdef HAVE_NDIR_H
  417. #  include <ndir.h>
  418. # endif
  419. #endif /* HAVE_DIRENT_H */
  420. ],[
  421. struct dirent d; int z; z = d.d_ino;
  422. ], mysql_cv_dirent_has_dino=yes, mysql_cv_dirent_has_dino=no)])
  423. AC_MSG_RESULT($mysql_cv_dirent_has_dino)
  424. if test $mysql_cv_dirent_has_dino = yes; then
  425. AC_DEFINE(STRUCT_DIRENT_HAS_D_INO)
  426. fi
  427. ])
  428. AC_DEFUN(MYSQL_TYPE_SIGHANDLER,
  429. [AC_MSG_CHECKING([whether signal handlers are of type void])
  430. AC_CACHE_VAL(mysql_cv_void_sighandler,
  431. [AC_TRY_COMPILE([#include <sys/types.h>
  432. #include <signal.h>
  433. #ifdef signal
  434. #undef signal
  435. #endif
  436. #ifdef __cplusplus
  437. extern "C"
  438. #endif
  439. void (*signal ()) ();],
  440. [int i;], mysql_cv_void_sighandler=yes, mysql_cv_void_sighandler=no)])dnl
  441. AC_MSG_RESULT($mysql_cv_void_sighandler)
  442. if test $mysql_cv_void_sighandler = yes; then
  443. AC_DEFINE(VOID_SIGHANDLER)
  444. fi
  445. ])
  446. AC_DEFUN(MYSQL_CXX_BOOL,
  447. [
  448. AC_REQUIRE([AC_PROG_CXX])
  449. AC_MSG_CHECKING(if ${CXX} supports bool types)
  450. AC_CACHE_VAL(mysql_cv_have_bool,
  451. [
  452. AC_LANG_SAVE
  453. AC_LANG_CPLUSPLUS
  454. AC_TRY_COMPILE(,[bool b = true;],
  455. mysql_cv_have_bool=yes,
  456. mysql_cv_have_bool=no)
  457. AC_LANG_RESTORE
  458. ])
  459. AC_MSG_RESULT($mysql_cv_have_bool)
  460. if test "$mysql_cv_have_bool" = yes; then
  461. AC_DEFINE(HAVE_BOOL)
  462. fi
  463. ])dnl
  464. AC_DEFUN(MYSQL_STACK_DIRECTION,
  465.  AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
  466.  [AC_TRY_RUN([find_stack_direction ()
  467.  {
  468.    static char *addr = 0;
  469.    auto char dummy;
  470.    if (addr == 0)
  471.      {
  472.        addr = &dummy;
  473.        return find_stack_direction ();
  474.      }
  475.    else
  476.      return (&dummy > addr) ? 1 : -1;
  477.  }
  478.  main ()
  479.  {
  480.    exit (find_stack_direction() < 0);
  481.  }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
  482.    ac_cv_c_stack_direction=0)])
  483.  AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
  484. )dnl
  485. AC_DEFUN(MYSQL_FUNC_ALLOCA,
  486. [
  487. # Since we have heard that alloca fails on IRIX never define it on a SGI machine
  488. if test ! "$host_vendor" = "sgi"
  489. then
  490.  AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
  491.  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  492.  # for constant arguments.  Useless!
  493.  AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
  494.  [AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
  495.    ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
  496.  if test $ac_cv_header_alloca_h = yes
  497.  then
  498. AC_DEFINE(HAVE_ALLOCA)
  499.  fi
  500.  
  501.  AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
  502.  [AC_TRY_LINK([
  503.  #ifdef __GNUC__
  504.  # define alloca __builtin_alloca
  505.  #else
  506.  # if HAVE_ALLOCA_H
  507.  #  include <alloca.h>
  508.  # else
  509.  #  ifdef _AIX
  510.   #pragma alloca
  511.  #  else
  512.  #   ifndef alloca /* predefined by HP cc +Olibcalls */
  513.  char *alloca ();
  514.  #   endif
  515.  #  endif
  516.  # endif
  517.  #endif
  518.  ], [char *p = (char *) alloca(1);],
  519.    ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)])
  520.  if test $ac_cv_func_alloca_works = yes; then
  521.    AC_DEFINE(HAVE_ALLOCA)
  522.  fi
  523.  
  524.  if test $ac_cv_func_alloca_works = no; then
  525.    # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  526.    # that cause trouble.  Some versions do not even contain alloca or
  527.    # contain a buggy version.  If you still want to use their alloca,
  528.    # use ar to extract alloca.o from them instead of compiling alloca.c.
  529.    ALLOCA=alloca.o
  530.    AC_DEFINE(C_ALLOCA)
  531.  
  532.  AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray,
  533.  [AC_EGREP_CPP(webecray,
  534.  [#if defined(CRAY) && ! defined(CRAY2)
  535.  webecray
  536.  #else
  537.  wenotbecray
  538.  #endif
  539.  ], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
  540.  if test $ac_cv_os_cray = yes; then
  541.  for ac_func in _getb67 GETB67 getb67; do
  542.    AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func)
  543.    break])
  544.  done
  545.  fi
  546.  fi
  547.  AC_SUBST(ALLOCA)dnl
  548. else
  549.  AC_MSG_RESULT("Skipped alloca tests")
  550. fi
  551. ])
  552. AC_DEFUN(MYSQL_CHECK_LONGLONG_TO_FLOAT,
  553. [
  554. AC_MSG_CHECKING(if conversion of longlong to float works)
  555. AC_CACHE_VAL(ac_cv_conv_longlong_to_float,
  556. [AC_TRY_RUN([#include <stdio.h>
  557. typedef long long longlong;
  558. main()
  559. {
  560.   longlong ll=1;
  561.   float f;
  562.   FILE *file=fopen("conftestval", "w");
  563.   f = (float) ll;
  564.   fprintf(file,"%gn",f);
  565.   close(file);
  566.   exit (0);
  567. }], ac_cv_conv_longlong_to_float=`cat conftestval`, ac_cv_conv_longlong_to_float=0, ifelse([$2], , , ac_cv_conv_longlong_to_float=$2))])dnl
  568. if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes"
  569. then
  570.   ac_cv_conv_longlong_to_float=yes
  571. else
  572.   ac_cv_conv_longlong_to_float=no
  573. fi
  574. AC_MSG_RESULT($ac_cv_conv_longlong_to_float)
  575. ])
  576. dnl ---------------------------------------------------------------------------
  577. dnl Macro: MYSQL_CHECK_BDB
  578. dnl Sets HAVE_BERKELEY_DB if inst library is found
  579. dnl Makes sure db version is correct.
  580. dnl Looks in $srcdir for Berkeley distribution if not told otherwise
  581. dnl ---------------------------------------------------------------------------
  582. AC_DEFUN([MYSQL_CHECK_BDB], [
  583.   AC_ARG_WITH([berkeley-db],
  584.               [
  585.   --with-berkeley-db[=DIR]
  586.                           Use BerkeleyDB located in DIR],
  587.               [bdb="$withval"],
  588.               [bdb=no])
  589.   AC_ARG_WITH([berkeley-db-includes],
  590.               [
  591.   --with-berkeley-db-includes=DIR
  592.                           Find Berkeley DB headers in DIR],
  593.               [bdb_includes="$withval"],
  594.               [bdb_includes=default])
  595.   AC_ARG_WITH([berkeley-db-libs],
  596.               [
  597.   --with-berkeley-db-libs=DIR
  598.                           Find Berkeley DB libraries in DIR],
  599.               [bdb_libs="$withval"],
  600.               [bdb_libs=default])
  601.   AC_MSG_CHECKING([for BerkeleyDB])
  602. dnl     SORT OUT THE SUPPLIED ARGUMENTS TO DETERMINE WHAT TO DO
  603. dnl echo "DBG1: bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'"
  604.   have_berkeley_db=no
  605.   case "$bdb" in
  606.     no )
  607.       mode=no
  608.       AC_MSG_RESULT([no])
  609.       ;;
  610.     yes | default )
  611.       case "$bdb_includes---$bdb_libs" in
  612.         default---default )
  613.           mode=search-$bdb
  614.           AC_MSG_RESULT([searching...])
  615.           ;;
  616.         default---* | *---default | yes---* | *---yes )
  617.           AC_MSG_ERROR([if either 'includes' or 'libs' is specified, both must be specified])
  618.           ;;
  619.         * )
  620.           mode=supplied-two
  621.           AC_MSG_RESULT([supplied])
  622.           ;;
  623.       esac
  624.       ;;
  625.     * )
  626.       mode=supplied-one
  627.       AC_MSG_RESULT([supplied])
  628.       ;;
  629.   esac
  630. dnl echo "DBG2: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'"
  631.   case $mode in
  632.     no )
  633.       bdb_includes=
  634.       bdb_libs=
  635.       ;;
  636.     supplied-two )
  637.       MYSQL_CHECK_INSTALLED_BDB([$bdb_includes], [$bdb_libs])
  638.       case $bdb_dir_ok in
  639.         installed ) mode=yes ;;
  640.         * ) AC_MSG_ERROR([didn't find valid BerkeleyDB: $bdb_dir_ok]) ;;
  641.       esac
  642.       ;;
  643.     supplied-one )
  644.       MYSQL_CHECK_BDB_DIR([$bdb])
  645.       case $bdb_dir_ok in
  646.         source ) mode=compile ;;
  647.         installed ) mode=yes ;;
  648.         * ) AC_MSG_ERROR([didn't find valid BerkeleyDB: $bdb_dir_ok]) ;;
  649.       esac
  650.       ;;
  651.     search-* )
  652.       MYSQL_SEARCH_FOR_BDB
  653.       case $bdb_dir_ok in
  654.         source ) mode=compile ;;
  655.         installed ) mode=yes ;;
  656.         * )
  657.           # not found
  658.           case $mode in
  659.             *-yes ) AC_MSG_ERROR([no suitable BerkeleyDB found]) ;;
  660.             * ) mode=no ;;
  661.           esac
  662.          bdb_includes=
  663.          bdb_libs=
  664.           ;;
  665.       esac
  666.       ;;
  667.     *)
  668.       AC_MSG_ERROR([impossible case condition '$mode': please report this to bugs@lists.mysql.com])
  669.       ;;
  670.   esac
  671. dnl echo "DBG3: [$mode] bdb='$bdb'; incl='$bdb_includes'; lib='$bdb_libs'"
  672.   case $mode in
  673.     no )
  674.       AC_MSG_RESULT([Not using Berkeley DB])
  675.       ;;
  676.     yes )
  677.       have_berkeley_db="yes"
  678.       AC_MSG_RESULT([Using Berkeley DB in '$bdb_includes'])
  679.       ;;
  680.     compile )
  681.       have_berkeley_db="$bdb"
  682.       AC_MSG_RESULT([Compiling Berekeley DB in '$have_berkeley_db'])
  683.       ;;
  684.     * )
  685.       AC_MSG_ERROR([impossible case condition '$mode': please report this to bugs@lists.mysql.com])
  686.       ;;
  687.   esac
  688.   AC_SUBST(bdb_includes)
  689.   AC_SUBST(bdb_libs)
  690. ])
  691. AC_DEFUN([MYSQL_CHECK_INSTALLED_BDB], [
  692. dnl echo ["MYSQL_CHECK_INSTALLED_BDB ($1) ($2)"]
  693.   inc="$1"
  694.   lib="$2"
  695.   if test -f "$inc/db.h"
  696.   then
  697.     MYSQL_CHECK_BDB_VERSION([$inc/db.h],
  698.       [.*#define[  ]*], [[  ][  ]*])
  699.     if test X"$bdb_version_ok" = Xyes; then
  700.       save_LDFLAGS="$LDFLAGS"
  701.       LDFLAGS="-L$lib $LDFLAGS"
  702.       AC_CHECK_LIB(db,db_env_create, [
  703.         bdb_dir_ok=installed
  704.         MYSQL_TOP_BUILDDIR([inc])
  705.         MYSQL_TOP_BUILDDIR([lib])
  706.         bdb_includes="-I$inc"
  707.         bdb_libs="-L$lib -ldb"
  708.       ])
  709.       LDFLAGS="$save_LDFLAGS"
  710.     else
  711.       bdb_dir_ok="$bdb_version_ok"
  712.     fi
  713.   else
  714.     bdb_dir_ok="no db.h file in '$inc'"
  715.   fi
  716. ])
  717. AC_DEFUN([MYSQL_CHECK_BDB_DIR], [
  718. dnl ([$bdb])
  719. dnl echo ["MYSQL_CHECK_BDB_DIR ($1)"]
  720.   dir="$1"
  721.   MYSQL_CHECK_INSTALLED_BDB([$dir/include], [$dir/lib])
  722.   if test X"$bdb_dir_ok" != Xinstalled; then
  723.     # test to see if it's a source dir
  724.     rel="$dir/dist/RELEASE"
  725.     if test -f "$rel"; then
  726.       MYSQL_CHECK_BDB_VERSION([$rel], [], [=])
  727.       if test X"$bdb_version_ok" = Xyes; then
  728.         bdb_dir_ok=source
  729.         bdb="$dir"
  730.         MYSQL_TOP_BUILDDIR([dir])
  731.         bdb_includes="-I$dir/build_unix"
  732.         bdb_libs="-L$dir/build_unix -ldb"
  733.       else
  734.         bdb_dir_ok="$bdb_version_ok"
  735.       fi
  736.     else
  737.       bdb_dir_ok="'$dir' doesn't look like a BDB directory ($bdb_dir_ok)"
  738.     fi
  739.   fi
  740. ])
  741. AC_DEFUN([MYSQL_SEARCH_FOR_BDB], [
  742. dnl echo ["MYSQL_SEARCH_FOR_BDB"]
  743.   bdb_dir_ok="no BerkeleyDB found"
  744.   for test_dir in $srcdir/bdb $srcdir/db-*.*.* /usr/local/BerkeleyDB*; do
  745. dnl    echo "-----------> Looking at ($test_dir; `cd $test_dir && pwd`)"
  746.     MYSQL_CHECK_BDB_DIR([$test_dir])
  747.     if test X"$bdb_dir_ok" = Xsource || test X"$bdb_dir_ok" = Xinstalled; then
  748. dnl echo "-----------> Found it ($bdb), ($srcdir)"
  749. dnl     This is needed so that 'make distcheck' works properly (VPATH build).
  750. dnl     VPATH build won't work if bdb is not under the source tree; but in
  751. dnl     that case, hopefully people will just make and install inside the
  752. dnl     tree, or install BDB first, and then use the installed version.
  753. case "$bdb" in
  754. "$srcdir/"* ) bdb=`echo "$bdb" | sed -e "s,^$srcdir/,,"` ;;
  755. esac
  756.         break
  757.     fi
  758.   done
  759. ])
  760. dnl MYSQL_CHECK_BDB_VERSION takes 3 arguments:
  761. dnl     1)  the file to look in
  762. dnl     2)  the search pattern before DB_VERSION_XXX
  763. dnl     3)  the search pattern between DB_VERSION_XXX and the number
  764. dnl It assumes that the number is the last thing on the line
  765. AC_DEFUN([MYSQL_CHECK_BDB_VERSION], [
  766.   db_major=`sed -e '/^[$2]DB_VERSION_MAJOR[$3]/ !d' -e 's///' [$1]`
  767.   db_minor=`sed -e '/^[$2]DB_VERSION_MINOR[$3]/ !d' -e 's///' [$1]`
  768.   db_patch=`sed -e '/^[$2]DB_VERSION_PATCH[$3]/ !d' -e 's///' [$1]`
  769.   test -z "$db_major" && db_major=0
  770.   test -z "$db_minor" && db_minor=0
  771.   test -z "$db_patch" && db_patch=0
  772.   # This is ugly, but about as good as it can get
  773.   mysql_bdb=
  774.   if test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 3
  775.   then
  776.     mysql_bdb=h
  777.   elif test $db_major -eq 3 && test $db_minor -eq 2 && test $db_patch -eq 9
  778.   then
  779.     want_bdb_version="3.2.9a" # hopefully this will stay up-to-date
  780.     mysql_bdb=a
  781.   fi
  782.   if test -n "$mysql_bdb" && 
  783. grep "DB_VERSION_STRING.*:.*$mysql_bdb: " [$1] > /dev/null
  784.   then
  785.     bdb_version_ok=yes
  786.   else
  787.     bdb_version_ok="invalid version $db_major.$db_minor.$db_patch"
  788.     bdb_version_ok="$bdb_version_ok (must be version 3.2.3h or $want_bdb_version)"
  789.   fi
  790. ])
  791. AC_DEFUN([MYSQL_TOP_BUILDDIR], [
  792.   case "$[$1]" in
  793.     /* ) ;; # don't do anything with an absolute path
  794.     "$srcdir"/* )
  795.       # If BDB is under the source directory, we need to look under the
  796.       # build directory for bdb/build_unix.
  797.       # NOTE: I'm being lazy, and assuming the user did not specify
  798.       # something like --with-berkeley-db=bdb (it would be missing "./").
  799.       [$1]="$(top_builddir)/"`echo "$[$1]" | sed -e "s,^$srcdir/,,"`
  800.       ;;
  801.     * )
  802.       AC_MSG_ERROR([The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$[$1]')])
  803.       ;;
  804.   esac
  805.   if test X"$[$1]" != "/"
  806.   then
  807.     [$1]=`echo $[$1] | sed -e 's,/$,,'`
  808.   fi
  809. ])
  810. dnl ---------------------------------------------------------------------------
  811. dnl END OF MYSQL_CHECK_BDB SECTION
  812. dnl ---------------------------------------------------------------------------
  813. dnl ---------------------------------------------------------------------------
  814. dnl Macro: MYSQL_CHECK_INNOBASE
  815. dnl Sets HAVE_INNOBASE_DB if --with-innobase is used
  816. dnl ---------------------------------------------------------------------------
  817. AC_DEFUN([MYSQL_CHECK_INNOBASE], [
  818.   AC_ARG_WITH([innobase],
  819.               [
  820.   --with-innobase         Use Innobase],
  821.               [innobase="$withval"],
  822.               [innobase=no])
  823.   AC_MSG_CHECKING([for Innobase])
  824.   have_innobase_db=no
  825.   innobase_includes=
  826.   innobase_libs=
  827.   case "$innobase" in
  828.     yes )
  829.       AC_MSG_RESULT([Using Innobase])
  830.       AC_DEFINE(HAVE_INNOBASE_DB)
  831.       have_innobase_db="yes"
  832.       innobase_includes="-I../innobase/include"
  833. dnl Some libs are listed several times, in order for gcc to sort out
  834. dnl circular references.
  835.       innobase_libs="
  836.  ../innobase/usr/libusr.a
  837.  ../innobase/odbc/libodbc.a
  838.  ../innobase/srv/libsrv.a
  839.  ../innobase/que/libque.a
  840.  ../innobase/dict/libdict.a
  841.  ../innobase/ibuf/libibuf.a
  842.  ../innobase/row/librow.a
  843.  ../innobase/pars/libpars.a
  844.  ../innobase/btr/libbtr.a
  845.  ../innobase/trx/libtrx.a
  846.  ../innobase/read/libread.a
  847.  ../innobase/usr/libusr.a
  848.  ../innobase/buf/libbuf.a
  849.  ../innobase/ibuf/libibuf.a
  850.  ../innobase/eval/libeval.a
  851.  ../innobase/log/liblog.a
  852.  ../innobase/fsp/libfsp.a
  853.  ../innobase/fut/libfut.a
  854.  ../innobase/fil/libfil.a
  855.  ../innobase/lock/liblock.a
  856.  ../innobase/mtr/libmtr.a
  857.  ../innobase/page/libpage.a
  858.  ../innobase/rem/librem.a
  859.  ../innobase/thr/libthr.a
  860.  ../innobase/com/libcom.a
  861.  ../innobase/sync/libsync.a
  862.  ../innobase/data/libdata.a
  863.  ../innobase/mach/libmach.a
  864.  ../innobase/ha/libha.a
  865.  ../innobase/dyn/libdyn.a
  866.  ../innobase/mem/libmem.a
  867.  ../innobase/sync/libsync.a
  868.  ../innobase/ut/libut.a
  869.  ../innobase/os/libos.a
  870.  ../innobase/ut/libut.a"
  871.       AC_CHECK_LIB(rt, aio_read, [innobase_libs="$innobase_libs -lrt"])
  872.       ;;
  873.     * )
  874.       AC_MSG_RESULT([Not using Innobase])
  875.       ;;
  876.   esac
  877.   AC_SUBST(innobase_includes)
  878.   AC_SUBST(innobase_libs)
  879. ])
  880. dnl ---------------------------------------------------------------------------
  881. dnl END OF MYSQL_CHECK_INNOBASE SECTION
  882. dnl ---------------------------------------------------------------------------
  883. dnl ---------------------------------------------------------------------------
  884. dnl Got this from the GNU tar 1.13.11 distribution
  885. dnl by Paul Eggert <eggert@twinsun.com>
  886. dnl ---------------------------------------------------------------------------
  887. dnl By default, many hosts won't let programs access large files;
  888. dnl one must use special compiler options to get large-file access to work.
  889. dnl For more details about this brain damage please see:
  890. dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
  891. dnl Written by Paul Eggert <eggert@twinsun.com>.
  892. dnl Internal subroutine of AC_SYS_LARGEFILE.
  893. dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
  894. AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
  895.   [AC_CACHE_CHECK([for $1 value to request large file support],
  896.      ac_cv_sys_largefile_$1,
  897.      [if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2
  898.       then
  899.         ac_cv_sys_largefile_$1=`cat conftest.1`
  900.       else
  901. ac_cv_sys_largefile_$1=no
  902. ifelse($1, CFLAGS,
  903.   [case "$host_os" in
  904.    # HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
  905. changequote(, )dnl
  906.    hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
  907. changequote([, ])dnl
  908.      if test "$GCC" = yes; then
  909.        ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
  910.      fi
  911.      ;;
  912.    # IRIX 6.2 and later require cc -n32.
  913. changequote(, )dnl
  914.    irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
  915. changequote([, ])dnl
  916.      if test "$GCC" != yes; then
  917.        ac_cv_sys_largefile_CFLAGS=-n32
  918.      fi
  919.    esac
  920.    if test "$ac_cv_sys_largefile_CFLAGS" != no; then
  921.      ac_save_CC="$CC"
  922.      CC="$CC $ac_cv_sys_largefile_CFLAGS"
  923.      AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
  924.      CC="$ac_save_CC"
  925.    fi])
  926.       fi
  927.       rm -f conftest*])])
  928. dnl Internal subroutine of AC_SYS_LARGEFILE.
  929. dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
  930. AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
  931.   [case $2 in
  932.    no) ;;
  933.    ?*)
  934.      case "[$]$1" in
  935.      '') $1=$2 ;;
  936.      *) $1=[$]$1' '$2 ;;
  937.      esac ;;
  938.    esac])
  939. dnl Internal subroutine of AC_SYS_LARGEFILE.
  940. dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
  941. AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
  942.   [AC_CACHE_CHECK([for $1], $2,
  943.      [$2=no
  944. changequote(, )dnl
  945.       $4
  946.       for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
  947. case "$ac_flag" in
  948. -D$1)
  949.   $2=1 ;;
  950. -D$1=*)
  951.   $2=`expr " $ac_flag" : '[^=]*=(.*)'` ;;
  952. esac
  953.       done
  954. changequote([, ])dnl
  955.       ])
  956.    if test "[$]$2" != no; then
  957.      AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
  958.    fi])
  959. AC_DEFUN(AC_SYS_LARGEFILE,
  960.   [AC_REQUIRE([AC_CANONICAL_HOST])
  961.    AC_ARG_ENABLE(largefile,
  962.      [  --disable-large-files   Omit support for large files])
  963.    if test "$enable_largefile" != no; then
  964.      AC_CHECK_TOOL(GETCONF, getconf)
  965.      AC_SYS_LARGEFILE_FLAGS(CFLAGS)
  966.      AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
  967.      AC_SYS_LARGEFILE_FLAGS(LIBS)
  968.      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
  969.        case "$ac_flag" in
  970.        no) ;;
  971.        -D_FILE_OFFSET_BITS=*) ;;
  972.        -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
  973.        -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
  974.        -D?* | -I?*)
  975.  AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
  976.        *)
  977.  AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
  978.        esac
  979.      done
  980.      AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
  981.      AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
  982.      AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
  983.        ac_cv_sys_file_offset_bits,
  984.        [Number of bits in a file offset, on hosts where this is settable.],
  985.        [case "$host_os" in
  986. # HP-UX 10.20 and later
  987. hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
  988.   ac_cv_sys_file_offset_bits=64 ;;
  989. esac])
  990.      AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
  991.        ac_cv_sys_largefile_source,
  992.        [Define to make fseeko etc. visible, on some hosts.],
  993.        [case "$host_os" in
  994. # HP-UX 10.20 and later
  995. hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
  996.   ac_cv_sys_largefile_source=1 ;;
  997. esac])
  998.      AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
  999.        ac_cv_sys_large_files,
  1000.        [Define for large files, on AIX-style hosts.],
  1001.        [case "$host_os" in
  1002. # AIX 4.2 and later
  1003. aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
  1004.   ac_cv_sys_large_files=1 ;;
  1005. esac])
  1006.    fi
  1007.   ])