diff options
| author | Aiden Woodruff <aiden.woodruff@gmail.com> | 2018-09-04 18:09:51 -0500 |
|---|---|---|
| committer | Aiden Woodruff <aiden.woodruff@gmail.com> | 2018-09-04 18:09:51 -0500 |
| commit | f4cb6a5879a7be0bbc15a2a04eb4977248316ad1 (patch) | |
| tree | 35ff1234c26adbdf29ee1645351749315d587eaa /configure | |
| parent | 82911972c6e1b8e01e820b4e413ef684ed95bffc (diff) | |
| download | life-f4cb6a5879a7be0bbc15a2a04eb4977248316ad1.tar.gz life-f4cb6a5879a7be0bbc15a2a04eb4977248316ad1.tar.bz2 life-f4cb6a5879a7be0bbc15a2a04eb4977248316ad1.zip | |
Fix small autoconf, automake, etc. issues
autoconf: check for C preprocessor and typeof extension
automake: Change headers to be noinst
Use return at end of main, not exit
sanity sanity don't run exec
blank test correctly order redirections
Signed-off-by: Aiden Woodruff <aiden.woodruff@gmail.com>
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 212 |
1 files changed, 133 insertions, 79 deletions
| @@ -1487,21 +1487,20 @@ fi | |||
| 1487 | 1487 | ||
| 1488 | } # ac_fn_c_try_compile | 1488 | } # ac_fn_c_try_compile |
| 1489 | 1489 | ||
| 1490 | # ac_fn_c_try_link LINENO | 1490 | # ac_fn_c_try_cpp LINENO |
| 1491 | # ----------------------- | 1491 | # ---------------------- |
| 1492 | # Try to link conftest.$ac_ext, and return whether this succeeded. | 1492 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. |
| 1493 | ac_fn_c_try_link () | 1493 | ac_fn_c_try_cpp () |
| 1494 | { | 1494 | { |
| 1495 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | 1495 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1496 | rm -f conftest.$ac_objext conftest$ac_exeext | 1496 | if { { ac_try="$ac_cpp conftest.$ac_ext" |
| 1497 | if { { ac_try="$ac_link" | ||
| 1498 | case "(($ac_try" in | 1497 | case "(($ac_try" in |
| 1499 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | 1498 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1500 | *) ac_try_echo=$ac_try;; | 1499 | *) ac_try_echo=$ac_try;; |
| 1501 | esac | 1500 | esac |
| 1502 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | 1501 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1503 | $as_echo "$ac_try_echo"; } >&5 | 1502 | $as_echo "$ac_try_echo"; } >&5 |
| 1504 | (eval "$ac_link") 2>conftest.err | 1503 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err |
| 1505 | ac_status=$? | 1504 | ac_status=$? |
| 1506 | if test -s conftest.err; then | 1505 | if test -s conftest.err; then |
| 1507 | grep -v '^ *+' conftest.err >conftest.er1 | 1506 | grep -v '^ *+' conftest.err >conftest.er1 |
| @@ -1509,44 +1508,37 @@ $as_echo "$ac_try_echo"; } >&5 | |||
| 1509 | mv -f conftest.er1 conftest.err | 1508 | mv -f conftest.er1 conftest.err |
| 1510 | fi | 1509 | fi |
| 1511 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | 1510 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1512 | test $ac_status = 0; } && { | 1511 | test $ac_status = 0; } > conftest.i && { |
| 1513 | test -z "$ac_c_werror_flag" || | 1512 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
| 1514 | test ! -s conftest.err | 1513 | test ! -s conftest.err |
| 1515 | } && test -s conftest$ac_exeext && { | ||
| 1516 | test "$cross_compiling" = yes || | ||
| 1517 | test -x conftest$ac_exeext | ||
| 1518 | }; then : | 1514 | }; then : |
| 1519 | ac_retval=0 | 1515 | ac_retval=0 |
| 1520 | else | 1516 | else |
| 1521 | $as_echo "$as_me: failed program was:" >&5 | 1517 | $as_echo "$as_me: failed program was:" >&5 |
| 1522 | sed 's/^/| /' conftest.$ac_ext >&5 | 1518 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1523 | 1519 | ||
| 1524 | ac_retval=1 | 1520 | ac_retval=1 |
| 1525 | fi | 1521 | fi |
| 1526 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | ||
| 1527 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | ||
| 1528 | # interfere with the next link command; also delete a directory that is | ||
| 1529 | # left behind by Apple's compiler. We do this before executing the actions. | ||
| 1530 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | ||
| 1531 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | 1522 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1532 | as_fn_set_status $ac_retval | 1523 | as_fn_set_status $ac_retval |
| 1533 | 1524 | ||
| 1534 | } # ac_fn_c_try_link | 1525 | } # ac_fn_c_try_cpp |
| 1535 | 1526 | ||
| 1536 | # ac_fn_c_try_cpp LINENO | 1527 | # ac_fn_c_try_link LINENO |
| 1537 | # ---------------------- | 1528 | # ----------------------- |
| 1538 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | 1529 | # Try to link conftest.$ac_ext, and return whether this succeeded. |
| 1539 | ac_fn_c_try_cpp () | 1530 | ac_fn_c_try_link () |
| 1540 | { | 1531 | { |
| 1541 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | 1532 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1542 | if { { ac_try="$ac_cpp conftest.$ac_ext" | 1533 | rm -f conftest.$ac_objext conftest$ac_exeext |
| 1534 | if { { ac_try="$ac_link" | ||
| 1543 | case "(($ac_try" in | 1535 | case "(($ac_try" in |
| 1544 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | 1536 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1545 | *) ac_try_echo=$ac_try;; | 1537 | *) ac_try_echo=$ac_try;; |
| 1546 | esac | 1538 | esac |
| 1547 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | 1539 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1548 | $as_echo "$ac_try_echo"; } >&5 | 1540 | $as_echo "$ac_try_echo"; } >&5 |
| 1549 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | 1541 | (eval "$ac_link") 2>conftest.err |
| 1550 | ac_status=$? | 1542 | ac_status=$? |
| 1551 | if test -s conftest.err; then | 1543 | if test -s conftest.err; then |
| 1552 | grep -v '^ *+' conftest.err >conftest.er1 | 1544 | grep -v '^ *+' conftest.err >conftest.er1 |
| @@ -1554,21 +1546,29 @@ $as_echo "$ac_try_echo"; } >&5 | |||
| 1554 | mv -f conftest.er1 conftest.err | 1546 | mv -f conftest.er1 conftest.err |
| 1555 | fi | 1547 | fi |
| 1556 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | 1548 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1557 | test $ac_status = 0; } > conftest.i && { | 1549 | test $ac_status = 0; } && { |
| 1558 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | 1550 | test -z "$ac_c_werror_flag" || |
| 1559 | test ! -s conftest.err | 1551 | test ! -s conftest.err |
| 1552 | } && test -s conftest$ac_exeext && { | ||
| 1553 | test "$cross_compiling" = yes || | ||
| 1554 | test -x conftest$ac_exeext | ||
| 1560 | }; then : | 1555 | }; then : |
| 1561 | ac_retval=0 | 1556 | ac_retval=0 |
| 1562 | else | 1557 | else |
| 1563 | $as_echo "$as_me: failed program was:" >&5 | 1558 | $as_echo "$as_me: failed program was:" >&5 |
| 1564 | sed 's/^/| /' conftest.$ac_ext >&5 | 1559 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1565 | 1560 | ||
| 1566 | ac_retval=1 | 1561 | ac_retval=1 |
| 1567 | fi | 1562 | fi |
| 1563 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | ||
| 1564 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | ||
| 1565 | # interfere with the next link command; also delete a directory that is | ||
| 1566 | # left behind by Apple's compiler. We do this before executing the actions. | ||
| 1567 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | ||
| 1568 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | 1568 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1569 | as_fn_set_status $ac_retval | 1569 | as_fn_set_status $ac_retval |
| 1570 | 1570 | ||
| 1571 | } # ac_fn_c_try_cpp | 1571 | } # ac_fn_c_try_link |
| 1572 | 1572 | ||
| 1573 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | 1573 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
| 1574 | # ------------------------------------------------------- | 1574 | # ------------------------------------------------------- |
| @@ -3214,56 +3214,6 @@ if test "x$ac_cv_prog_cc_c99" != xno; then : | |||
| 3214 | fi | 3214 | fi |
| 3215 | 3215 | ||
| 3216 | 3216 | ||
| 3217 | |||
| 3218 | # Checks for libraries. | ||
| 3219 | |||
| 3220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5 | ||
| 3221 | $as_echo_n "checking for initscr in -lncurses... " >&6; } | ||
| 3222 | if ${ac_cv_lib_ncurses_initscr+:} false; then : | ||
| 3223 | $as_echo_n "(cached) " >&6 | ||
| 3224 | else | ||
| 3225 | ac_check_lib_save_LIBS=$LIBS | ||
| 3226 | LIBS="-lncurses $LIBS" | ||
| 3227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 3228 | /* end confdefs.h. */ | ||
| 3229 | |||
| 3230 | /* Override any GCC internal prototype to avoid an error. | ||
| 3231 | Use char because int might match the return type of a GCC | ||
| 3232 | builtin and then its argument prototype would still apply. */ | ||
| 3233 | #ifdef __cplusplus | ||
| 3234 | extern "C" | ||
| 3235 | #endif | ||
| 3236 | char initscr (); | ||
| 3237 | int | ||
| 3238 | main () | ||
| 3239 | { | ||
| 3240 | return initscr (); | ||
| 3241 | ; | ||
| 3242 | return 0; | ||
| 3243 | } | ||
| 3244 | _ACEOF | ||
| 3245 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 3246 | ac_cv_lib_ncurses_initscr=yes | ||
| 3247 | else | ||
| 3248 | ac_cv_lib_ncurses_initscr=no | ||
| 3249 | fi | ||
| 3250 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 3251 | conftest$ac_exeext conftest.$ac_ext | ||
| 3252 | LIBS=$ac_check_lib_save_LIBS | ||
| 3253 | fi | ||
| 3254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5 | ||
| 3255 | $as_echo "$ac_cv_lib_ncurses_initscr" >&6; } | ||
| 3256 | if test "x$ac_cv_lib_ncurses_initscr" = xyes; then : | ||
| 3257 | cat >>confdefs.h <<_ACEOF | ||
| 3258 | #define HAVE_LIBNCURSES 1 | ||
| 3259 | _ACEOF | ||
| 3260 | |||
| 3261 | LIBS="-lncurses $LIBS" | ||
| 3262 | |||
| 3263 | fi | ||
| 3264 | |||
| 3265 | |||
| 3266 | # Checks for header files. | ||
| 3267 | ac_ext=c | 3217 | ac_ext=c |
| 3268 | ac_cpp='$CPP $CPPFLAGS' | 3218 | ac_cpp='$CPP $CPPFLAGS' |
| 3269 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | 3219 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| @@ -3402,6 +3352,110 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ | |||
| 3402 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | 3352 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 3403 | 3353 | ||
| 3404 | 3354 | ||
| 3355 | |||
| 3356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof syntax and keyword spelling" >&5 | ||
| 3357 | $as_echo_n "checking for typeof syntax and keyword spelling... " >&6; } | ||
| 3358 | if ${ac_cv_c_typeof+:} false; then : | ||
| 3359 | $as_echo_n "(cached) " >&6 | ||
| 3360 | else | ||
| 3361 | ac_cv_c_typeof=no | ||
| 3362 | for ac_kw in typeof __typeof__ no; do | ||
| 3363 | test $ac_kw = no && break | ||
| 3364 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 3365 | /* end confdefs.h. */ | ||
| 3366 | |||
| 3367 | int | ||
| 3368 | main () | ||
| 3369 | { | ||
| 3370 | |||
| 3371 | int value; | ||
| 3372 | typedef struct { | ||
| 3373 | char a [1 | ||
| 3374 | + ! (($ac_kw (value)) | ||
| 3375 | (($ac_kw (value)) 0 < ($ac_kw (value)) -1 | ||
| 3376 | ? ($ac_kw (value)) - 1 | ||
| 3377 | : ~ (~ ($ac_kw (value)) 0 | ||
| 3378 | << sizeof ($ac_kw (value)))))]; } | ||
| 3379 | ac__typeof_type_; | ||
| 3380 | return | ||
| 3381 | (! ((void) ((ac__typeof_type_ *) 0), 0)); | ||
| 3382 | |||
| 3383 | ; | ||
| 3384 | return 0; | ||
| 3385 | } | ||
| 3386 | _ACEOF | ||
| 3387 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 3388 | ac_cv_c_typeof=$ac_kw | ||
| 3389 | fi | ||
| 3390 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 3391 | test $ac_cv_c_typeof != no && break | ||
| 3392 | done | ||
| 3393 | fi | ||
| 3394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_typeof" >&5 | ||
| 3395 | $as_echo "$ac_cv_c_typeof" >&6; } | ||
| 3396 | if test $ac_cv_c_typeof != no; then | ||
| 3397 | |||
| 3398 | $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h | ||
| 3399 | |||
| 3400 | if test $ac_cv_c_typeof != typeof; then | ||
| 3401 | |||
| 3402 | cat >>confdefs.h <<_ACEOF | ||
| 3403 | #define typeof $ac_cv_c_typeof | ||
| 3404 | _ACEOF | ||
| 3405 | |||
| 3406 | fi | ||
| 3407 | fi | ||
| 3408 | |||
| 3409 | |||
| 3410 | # Checks for libraries. | ||
| 3411 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5 | ||
| 3412 | $as_echo_n "checking for initscr in -lncurses... " >&6; } | ||
| 3413 | if ${ac_cv_lib_ncurses_initscr+:} false; then : | ||
| 3414 | $as_echo_n "(cached) " >&6 | ||
| 3415 | else | ||
| 3416 | ac_check_lib_save_LIBS=$LIBS | ||
| 3417 | LIBS="-lncurses $LIBS" | ||
| 3418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 3419 | /* end confdefs.h. */ | ||
| 3420 | |||
| 3421 | /* Override any GCC internal prototype to avoid an error. | ||
| 3422 | Use char because int might match the return type of a GCC | ||
| 3423 | builtin and then its argument prototype would still apply. */ | ||
| 3424 | #ifdef __cplusplus | ||
| 3425 | extern "C" | ||
| 3426 | #endif | ||
| 3427 | char initscr (); | ||
| 3428 | int | ||
| 3429 | main () | ||
| 3430 | { | ||
| 3431 | return initscr (); | ||
| 3432 | ; | ||
| 3433 | return 0; | ||
| 3434 | } | ||
| 3435 | _ACEOF | ||
| 3436 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 3437 | ac_cv_lib_ncurses_initscr=yes | ||
| 3438 | else | ||
| 3439 | ac_cv_lib_ncurses_initscr=no | ||
| 3440 | fi | ||
| 3441 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 3442 | conftest$ac_exeext conftest.$ac_ext | ||
| 3443 | LIBS=$ac_check_lib_save_LIBS | ||
| 3444 | fi | ||
| 3445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5 | ||
| 3446 | $as_echo "$ac_cv_lib_ncurses_initscr" >&6; } | ||
| 3447 | if test "x$ac_cv_lib_ncurses_initscr" = xyes; then : | ||
| 3448 | cat >>confdefs.h <<_ACEOF | ||
| 3449 | #define HAVE_LIBNCURSES 1 | ||
| 3450 | _ACEOF | ||
| 3451 | |||
| 3452 | LIBS="-lncurses $LIBS" | ||
| 3453 | |||
| 3454 | fi | ||
| 3455 | |||
| 3456 | |||
| 3457 | # Checks for header files. | ||
| 3458 | |||
| 3405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | 3459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
| 3406 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | 3460 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } |
| 3407 | if ${ac_cv_path_GREP+:} false; then : | 3461 | if ${ac_cv_path_GREP+:} false; then : |
