configure 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722
  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf.
  4. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
  17. # [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE[=VALUE]]
  18. # Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
  19. # --with-PACKAGE[=VALUE] unless this script has special code to handle it.
  20. for arg
  21. do
  22. # Handle --exec-prefix with a space before the argument.
  23. if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  24. # Handle --host with a space before the argument.
  25. elif test x$next_host = xyes; then next_host=
  26. # Handle --prefix with a space before the argument.
  27. elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  28. # Handle --srcdir with a space before the argument.
  29. elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  30. else
  31. case $arg in
  32. # For backward compatibility, also recognize exact -exec_prefix.
  33. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  34. exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  35. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  36. next_exec_prefix=yes ;;
  37. -gas | --gas | --ga | --g) ;;
  38. -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  39. -host | --host | --hos | --ho | --h)
  40. next_host=yes ;;
  41. -nfp | --nfp | --nf) ;;
  42. -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
  43. no_create=1 ;;
  44. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  45. prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  46. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  47. next_prefix=yes ;;
  48. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  49. srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  50. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  51. next_srcdir=yes ;;
  52. -with-* | --with-*)
  53. package=`echo $arg|sed -e 's/-*with-//' -e 's/=.*//'`
  54. # Reject names that aren't valid shell variable names.
  55. if test -n "`echo $package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  56. echo "configure: $package: invalid package name" >&2; exit 1
  57. fi
  58. package=`echo $package| sed 's/-/_/g'`
  59. case "$arg" in
  60. *=*) val="`echo $arg|sed 's/[^=]*=//'`" ;;
  61. *) val=1 ;;
  62. esac
  63. eval "with_$package='$val'" ;;
  64. -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  65. verbose=yes ;;
  66. *) ;;
  67. esac
  68. fi
  69. done
  70. trap 'rm -fr conftest* core; exit 1' 1 3 15
  71. # NLS nuisances.
  72. # These must not be set unconditionally because not all systems understand
  73. # e.g. LANG=C (notably SCO).
  74. if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
  75. if test "${LANG+set}" = 'set' ; then LANG=C; export LANG; fi
  76. rm -f conftest*
  77. compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  78. # A filename unique to this package, relative to the directory that
  79. # configure is in, which we can look for to find out if srcdir is correct.
  80. unique_file=reduce.c
  81. # Find the source files, if location was not specified.
  82. if test -z "$srcdir"; then
  83. srcdirdefaulted=yes
  84. # Try the directory containing this script, then `..'.
  85. prog=$0
  86. confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  87. test "X$confdir" = "X$prog" && confdir=.
  88. srcdir=$confdir
  89. if test ! -r $srcdir/$unique_file; then
  90. srcdir=..
  91. fi
  92. fi
  93. if test ! -r $srcdir/$unique_file; then
  94. if test x$srcdirdefaulted = xyes; then
  95. echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  96. else
  97. echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  98. fi
  99. exit 1
  100. fi
  101. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  102. # But we can't avoid them for `..', to make subdirectories work.
  103. case $srcdir in
  104. .|/*|~*) ;;
  105. *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  106. esac
  107. # Save the original args to write them into config.status later.
  108. configure_args="$*"
  109. if test -z "$CC"; then
  110. # Extract the first word of `gcc', so it can be a program name with args.
  111. set dummy gcc; word=$2
  112. echo checking for $word
  113. IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:"
  114. for dir in $PATH; do
  115. test -z "$dir" && dir=.
  116. if test -f $dir/$word; then
  117. CC="gcc"
  118. break
  119. fi
  120. done
  121. IFS="$saveifs"
  122. fi
  123. test -z "$CC" && CC="cc"
  124. test -n "$CC" -a -n "$verbose" && echo " setting CC to $CC"
  125. # Find out if we are using GNU C, under whatever name.
  126. cat > conftest.c <<EOF
  127. #ifdef __GNUC__
  128. yes
  129. #endif
  130. EOF
  131. ${CC-cc} -E conftest.c > conftest.out 2>&1
  132. if egrep yes conftest.out >/dev/null 2>&1; then
  133. GCC=1 # For later tests.
  134. fi
  135. rm -f conftest*
  136. echo checking how to run the C preprocessor
  137. if test -z "$CPP"; then
  138. # This must be in double quotes, not single quotes, because CPP may get
  139. # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  140. # make. It must be expanded now.
  141. CPP="${CC-cc} -E"
  142. cat > conftest.c <<EOF
  143. #include <stdio.h>
  144. Syntax Error
  145. EOF
  146. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  147. if test -z "$err"; then
  148. :
  149. else
  150. CPP=/lib/cpp
  151. fi
  152. rm -f conftest*
  153. fi
  154. test ".${verbose}" != "." && echo " setting CPP to $CPP"
  155. # Make sure to not get the incompatible SysV /etc/install and
  156. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  157. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  158. # or the AFS install, which mishandles nonexistent args, or
  159. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  160. # `staff'. On most BSDish systems install is in /usr/bin, not /usr/ucb
  161. # anyway. Sigh.
  162. if test "z${INSTALL}" = "z" ; then
  163. echo checking for install
  164. IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:"
  165. for dir in $PATH; do
  166. test -z "$dir" && dir=.
  167. case $dir in
  168. /etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  169. *)
  170. if test -f $dir/installbsd; then
  171. INSTALL="$dir/installbsd -c" # OSF1
  172. INSTALL_PROGRAM='$(INSTALL)'
  173. INSTALL_DATA='$(INSTALL) -m 644'
  174. break
  175. fi
  176. if test -f $dir/install; then
  177. if grep dspmsg $dir/install >/dev/null 2>&1; then
  178. : # AIX
  179. else
  180. INSTALL="$dir/install -c"
  181. INSTALL_PROGRAM='$(INSTALL)'
  182. INSTALL_DATA='$(INSTALL) -m 644'
  183. break
  184. fi
  185. fi
  186. ;;
  187. esac
  188. done
  189. IFS="$saveifs"
  190. fi
  191. INSTALL=${INSTALL-cp}
  192. test -n "$verbose" && echo " setting INSTALL to $INSTALL"
  193. INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  194. test -n "$verbose" && echo " setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  195. INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  196. test -n "$verbose" && echo " setting INSTALL_DATA to $INSTALL_DATA"
  197. echo checking for minix/config.h
  198. cat > conftest.c <<EOF
  199. #include <minix/config.h>
  200. EOF
  201. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  202. if test -z "$err"; then
  203. MINIX=1
  204. fi
  205. rm -f conftest*
  206. # The Minix shell can't assign to the same variable on the same line!
  207. if test -n "$MINIX"; then
  208. {
  209. test -n "$verbose" && \
  210. echo " defining _POSIX_SOURCE"
  211. DEFS="$DEFS -D_POSIX_SOURCE=1"
  212. }
  213. {
  214. test -n "$verbose" && \
  215. echo " defining _POSIX_1_SOURCE to be 2"
  216. DEFS="$DEFS -D_POSIX_1_SOURCE=2"
  217. }
  218. {
  219. test -n "$verbose" && \
  220. echo " defining _MINIX"
  221. DEFS="$DEFS -D_MINIX=1"
  222. }
  223. fi
  224. echo checking for POSIXized ISC
  225. if test -d /etc/conf/kconfig.d &&
  226. grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  227. then
  228. ISC=1 # If later tests want to check for ISC.
  229. {
  230. test -n "$verbose" && \
  231. echo " defining _POSIX_SOURCE"
  232. DEFS="$DEFS -D_POSIX_SOURCE=1"
  233. }
  234. if test -n "$GCC"; then
  235. CC="$CC -posix"
  236. else
  237. CC="$CC -Xp"
  238. fi
  239. fi
  240. prog='/* Ultrix mips cc rejects this. */
  241. typedef int charset[2]; const charset x;
  242. /* SunOS 4.1.1 cc rejects this. */
  243. char const *const *ccp;
  244. char **p;
  245. /* AIX XL C 1.02.0.0 rejects this.
  246. It does not let you subtract one const X* pointer from another in an arm
  247. of an if-expression whose if-part is not a constant expression */
  248. const char *g = "string";
  249. ccp = &g + (g ? g-g : 0);
  250. /* HPUX 7.0 cc rejects these. */
  251. ++ccp;
  252. p = (char**) ccp;
  253. ccp = (char const *const *) p;
  254. { /* SCO 3.2v4 cc rejects this. */
  255. char *t;
  256. char const *s = 0 ? (char *) 0 : (char const *) 0;
  257. *t++ = 0;
  258. }
  259. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
  260. int x[] = {25,17};
  261. const int *foo = &x[0];
  262. ++foo;
  263. }
  264. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  265. typedef const int *iptr;
  266. iptr p = 0;
  267. ++p;
  268. }
  269. { /* AIX XL C 1.02.0.0 rejects this saying
  270. "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  271. struct s { int j; const int *ap[3]; };
  272. struct s *b; b->j = 5;
  273. }'
  274. echo checking for working const
  275. cat > conftest.c <<EOF
  276. int main() { exit(0); }
  277. int t() { $prog }
  278. EOF
  279. if eval $compile; then
  280. :
  281. else
  282. {
  283. test -n "$verbose" && \
  284. echo " defining const to be empty"
  285. DEFS="$DEFS -Dconst="
  286. }
  287. fi
  288. rm -f conftest*
  289. echo checking for ANSI C header files
  290. cat > conftest.c <<EOF
  291. #include <stdlib.h>
  292. #include <stdarg.h>
  293. #include <string.h>
  294. #include <float.h>
  295. EOF
  296. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  297. if test -z "$err"; then
  298. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  299. echo '#include <string.h>' > conftest.c
  300. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  301. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  302. # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  303. cat > conftest.c <<EOF
  304. #include <ctype.h>
  305. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  306. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  307. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  308. int main () { int i; for (i = 0; i < 256; i++)
  309. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  310. exit (0); }
  311. EOF
  312. eval $compile
  313. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  314. {
  315. test -n "$verbose" && \
  316. echo " defining STDC_HEADERS"
  317. DEFS="$DEFS -DSTDC_HEADERS=1"
  318. }
  319. fi
  320. rm -f conftest*
  321. fi
  322. rm -f conftest*
  323. fi
  324. rm -f conftest*
  325. for hdr in string.h stdlib.h memory.h
  326. do
  327. trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  328. echo checking for ${hdr}
  329. cat > conftest.c <<EOF
  330. #include <${hdr}>
  331. EOF
  332. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  333. if test -z "$err"; then
  334. {
  335. test -n "$verbose" && \
  336. echo " defining ${trhdr}"
  337. DEFS="$DEFS -D${trhdr}=1"
  338. }
  339. fi
  340. rm -f conftest*
  341. done
  342. for func in strerror
  343. do
  344. trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'`
  345. echo checking for ${func}
  346. cat > conftest.c <<EOF
  347. #include <ctype.h>
  348. int main() { exit(0); }
  349. int t() {
  350. /* The GNU C library defines this for functions which it implements
  351. to always fail with ENOSYS. Some functions are actually named
  352. something starting with __ and the normal name is an alias. */
  353. #if defined (__stub_${func}) || defined (__stub___${func})
  354. choke me
  355. #else
  356. /* Override any gcc2 internal prototype to avoid an error. */
  357. extern char ${func}(); ${func}();
  358. #endif
  359. }
  360. EOF
  361. if eval $compile; then
  362. {
  363. test -n "$verbose" && \
  364. echo " defining ${trfunc}"
  365. DEFS="$DEFS -D${trfunc}=1"
  366. }
  367. fi
  368. rm -f conftest*
  369. done
  370. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  371. # for constant arguments. Useless!
  372. echo checking for working alloca.h
  373. cat > conftest.c <<EOF
  374. #include <alloca.h>
  375. int main() { exit(0); }
  376. int t() { char *p = alloca(2 * sizeof(int)); }
  377. EOF
  378. if eval $compile; then
  379. {
  380. test -n "$verbose" && \
  381. echo " defining HAVE_ALLOCA_H"
  382. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  383. }
  384. fi
  385. rm -f conftest*
  386. decl="#ifdef __GNUC__
  387. #define alloca __builtin_alloca
  388. #else
  389. #if HAVE_ALLOCA_H
  390. #include <alloca.h>
  391. #else
  392. #ifdef _AIX
  393. #pragma alloca
  394. #else
  395. char *alloca ();
  396. #endif
  397. #endif
  398. #endif
  399. "
  400. echo checking for alloca
  401. cat > conftest.c <<EOF
  402. $decl
  403. int main() { exit(0); }
  404. int t() { char *p = (char *) alloca(1); }
  405. EOF
  406. if eval $compile; then
  407. :
  408. else
  409. alloca_missing=1
  410. cat > conftest.c <<EOF
  411. #if defined(CRAY) && ! defined(CRAY2)
  412. winnitude
  413. #else
  414. lossage
  415. #endif
  416. EOF
  417. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  418. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  419. echo checking for _getb67
  420. cat > conftest.c <<EOF
  421. #include <ctype.h>
  422. int main() { exit(0); }
  423. int t() {
  424. /* The GNU C library defines this for functions which it implements
  425. to always fail with ENOSYS. Some functions are actually named
  426. something starting with __ and the normal name is an alias. */
  427. #if defined (__stub__getb67) || defined (__stub____getb67)
  428. choke me
  429. #else
  430. /* Override any gcc2 internal prototype to avoid an error. */
  431. extern char _getb67(); _getb67();
  432. #endif
  433. }
  434. EOF
  435. if eval $compile; then
  436. {
  437. test -n "$verbose" && \
  438. echo " defining CRAY_STACKSEG_END to be _getb67"
  439. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  440. }
  441. else
  442. echo checking for GETB67
  443. cat > conftest.c <<EOF
  444. #include <ctype.h>
  445. int main() { exit(0); }
  446. int t() {
  447. /* The GNU C library defines this for functions which it implements
  448. to always fail with ENOSYS. Some functions are actually named
  449. something starting with __ and the normal name is an alias. */
  450. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  451. choke me
  452. #else
  453. /* Override any gcc2 internal prototype to avoid an error. */
  454. extern char GETB67(); GETB67();
  455. #endif
  456. }
  457. EOF
  458. if eval $compile; then
  459. {
  460. test -n "$verbose" && \
  461. echo " defining CRAY_STACKSEG_END to be GETB67"
  462. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  463. }
  464. else
  465. echo checking for getb67
  466. cat > conftest.c <<EOF
  467. #include <ctype.h>
  468. int main() { exit(0); }
  469. int t() {
  470. /* The GNU C library defines this for functions which it implements
  471. to always fail with ENOSYS. Some functions are actually named
  472. something starting with __ and the normal name is an alias. */
  473. #if defined (__stub_getb67) || defined (__stub___getb67)
  474. choke me
  475. #else
  476. /* Override any gcc2 internal prototype to avoid an error. */
  477. extern char getb67(); getb67();
  478. #endif
  479. }
  480. EOF
  481. if eval $compile; then
  482. {
  483. test -n "$verbose" && \
  484. echo " defining CRAY_STACKSEG_END to be getb67"
  485. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  486. }
  487. fi
  488. rm -f conftest*
  489. fi
  490. rm -f conftest*
  491. fi
  492. rm -f conftest*
  493. fi
  494. rm -f conftest*
  495. fi
  496. rm -f conftest*
  497. if test -n "$alloca_missing"; then
  498. # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  499. # that cause trouble. Some versions do not even contain alloca or
  500. # contain a buggy version. If you still want to use their alloca,
  501. # use ar to extract alloca.o from them instead of compiling alloca.c.
  502. ALLOCA=alloca.o
  503. echo 'checking stack direction for C alloca'
  504. echo checking whether cross-compiling
  505. # If we cannot run a trivial program, we must be cross compiling.
  506. cat > conftest.c <<EOF
  507. main(){exit(0);}
  508. EOF
  509. eval $compile
  510. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  511. :
  512. else
  513. cross_compiling=1
  514. fi
  515. rm -f conftest*
  516. if test -n "$cross_compiling"
  517. then
  518. {
  519. test -n "$verbose" && \
  520. echo " defining STACK_DIRECTION to be 0"
  521. DEFS="$DEFS -DSTACK_DIRECTION=0"
  522. }
  523. else
  524. cat > conftest.c <<EOF
  525. find_stack_direction ()
  526. {
  527. static char *addr = 0;
  528. auto char dummy;
  529. if (addr == 0)
  530. {
  531. addr = &dummy;
  532. return find_stack_direction ();
  533. }
  534. else
  535. return (&dummy > addr) ? 1 : -1;
  536. }
  537. main ()
  538. {
  539. exit (find_stack_direction() < 0);
  540. }
  541. EOF
  542. eval $compile
  543. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  544. {
  545. test -n "$verbose" && \
  546. echo " defining STACK_DIRECTION to be 1"
  547. DEFS="$DEFS -DSTACK_DIRECTION=1"
  548. }
  549. else
  550. {
  551. test -n "$verbose" && \
  552. echo " defining STACK_DIRECTION to be -1"
  553. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  554. }
  555. fi
  556. fi
  557. rm -f conftest*
  558. fi
  559. if test -n "$prefix"; then
  560. test -z "$exec_prefix" && exec_prefix='${prefix}'
  561. prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
  562. fi
  563. if test -n "$exec_prefix"; then
  564. prsub="$prsub
  565. s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  566. fi
  567. cat >conftest.def <<EOF
  568. $DEFS
  569. EOF
  570. escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  571. DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
  572. rm -f conftest.def
  573. trap 'rm -f config.status; exit 1' 1 3 15
  574. echo creating config.status
  575. rm -f config.status
  576. cat > config.status <<EOF
  577. #!/bin/sh
  578. # Generated automatically by configure.
  579. # Run this file to recreate the current configuration.
  580. # This directory was configured as follows,
  581. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  582. #
  583. # $0 $configure_args
  584. for arg
  585. do
  586. case "\$arg" in
  587. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  588. echo running /bin/sh $0 $configure_args
  589. exec /bin/sh $0 $configure_args ;;
  590. *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  591. esac
  592. done
  593. trap 'rm -f Makefile; exit 1' 1 3 15
  594. CC='$CC'
  595. CPP='$CPP'
  596. INSTALL='$INSTALL'
  597. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  598. INSTALL_DATA='$INSTALL_DATA'
  599. ALLOCA='$ALLOCA'
  600. LIBS='$LIBS'
  601. srcdir='$srcdir'
  602. DEFS='$DEFS'
  603. prefix='$prefix'
  604. exec_prefix='$exec_prefix'
  605. prsub='$prsub'
  606. EOF
  607. cat >> config.status <<\EOF
  608. top_srcdir=$srcdir
  609. # Allow make-time overrides of the generated file list.
  610. test -n "$gen_files" || gen_files="Makefile"
  611. for file in .. $gen_files; do if [ "x$file" != "x.." ]; then
  612. srcdir=$top_srcdir
  613. # Remove last slash and all that follows it. Not all systems have dirname.
  614. dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  615. if test "$dir" != "$file"; then
  616. test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  617. test ! -d $dir && mkdir $dir
  618. fi
  619. echo creating $file
  620. rm -f $file
  621. echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  622. sed -e "
  623. $prsub
  624. s%@CC@%$CC%g
  625. s%@CPP@%$CPP%g
  626. s%@INSTALL@%$INSTALL%g
  627. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  628. s%@INSTALL_DATA@%$INSTALL_DATA%g
  629. s%@ALLOCA@%$ALLOCA%g
  630. s%@LIBS@%$LIBS%g
  631. s%@srcdir@%$srcdir%g
  632. s%@DEFS@%$DEFS%
  633. " $top_srcdir/${file}.in >> $file
  634. fi; done
  635. exit 0
  636. EOF
  637. chmod +x config.status
  638. test -n "$no_create" || ./config.status