aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorAiden Woodruff <aiden.woodruff@gmail.com>2018-09-04 18:09:51 -0500
committerAiden Woodruff <aiden.woodruff@gmail.com>2018-09-04 18:09:51 -0500
commitf4cb6a5879a7be0bbc15a2a04eb4977248316ad1 (patch)
tree35ff1234c26adbdf29ee1645351749315d587eaa /configure
parent82911972c6e1b8e01e820b4e413ef684ed95bffc (diff)
downloadlife-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-xconfigure212
1 files changed, 133 insertions, 79 deletions
diff --git a/configure b/configure
index 4572a18..b4680e9 100755
--- a/configure
+++ b/configure
@@ -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.
1493ac_fn_c_try_link () 1493ac_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"
1498case "(($ac_try" in 1497case "(($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;;
1501esac 1500esac
1502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1501eval 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
1520else 1516else
1521 $as_echo "$as_me: failed program was:" >&5 1517 $as_echo "$as_me: failed program was:" >&5
1522sed 's/^/| /' conftest.$ac_ext >&5 1518sed 's/^/| /' conftest.$ac_ext >&5
1523 1519
1524 ac_retval=1 1520 ac_retval=1
1525fi 1521fi
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.
1539ac_fn_c_try_cpp () 1530ac_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"
1543case "(($ac_try" in 1535case "(($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;;
1546esac 1538esac
1547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1539eval 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
1562else 1557else
1563 $as_echo "$as_me: failed program was:" >&5 1558 $as_echo "$as_me: failed program was:" >&5
1564sed 's/^/| /' conftest.$ac_ext >&5 1559sed 's/^/| /' conftest.$ac_ext >&5
1565 1560
1566 ac_retval=1 1561 ac_retval=1
1567fi 1562fi
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 :
3214fi 3214fi
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; }
3222if ${ac_cv_lib_ncurses_initscr+:} false; then :
3223 $as_echo_n "(cached) " >&6
3224else
3225 ac_check_lib_save_LIBS=$LIBS
3226LIBS="-lncurses $LIBS"
3227cat 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
3234extern "C"
3235#endif
3236char initscr ();
3237int
3238main ()
3239{
3240return initscr ();
3241 ;
3242 return 0;
3243}
3244_ACEOF
3245if ac_fn_c_try_link "$LINENO"; then :
3246 ac_cv_lib_ncurses_initscr=yes
3247else
3248 ac_cv_lib_ncurses_initscr=no
3249fi
3250rm -f core conftest.err conftest.$ac_objext \
3251 conftest$ac_exeext conftest.$ac_ext
3252LIBS=$ac_check_lib_save_LIBS
3253fi
3254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5
3255$as_echo "$ac_cv_lib_ncurses_initscr" >&6; }
3256if 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
3263fi
3264
3265
3266# Checks for header files.
3267ac_ext=c 3217ac_ext=c
3268ac_cpp='$CPP $CPPFLAGS' 3218ac_cpp='$CPP $CPPFLAGS'
3269ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3219ac_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 $
3402ac_compiler_gnu=$ac_cv_c_compiler_gnu 3352ac_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; }
3358if ${ac_cv_c_typeof+:} false; then :
3359 $as_echo_n "(cached) " >&6
3360else
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
3367int
3368main ()
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
3387if ac_fn_c_try_compile "$LINENO"; then :
3388 ac_cv_c_typeof=$ac_kw
3389fi
3390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3391 test $ac_cv_c_typeof != no && break
3392 done
3393fi
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
3402cat >>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; }
3413if ${ac_cv_lib_ncurses_initscr+:} false; then :
3414 $as_echo_n "(cached) " >&6
3415else
3416 ac_check_lib_save_LIBS=$LIBS
3417LIBS="-lncurses $LIBS"
3418cat 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
3425extern "C"
3426#endif
3427char initscr ();
3428int
3429main ()
3430{
3431return initscr ();
3432 ;
3433 return 0;
3434}
3435_ACEOF
3436if ac_fn_c_try_link "$LINENO"; then :
3437 ac_cv_lib_ncurses_initscr=yes
3438else
3439 ac_cv_lib_ncurses_initscr=no
3440fi
3441rm -f core conftest.err conftest.$ac_objext \
3442 conftest$ac_exeext conftest.$ac_ext
3443LIBS=$ac_check_lib_save_LIBS
3444fi
3445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5
3446$as_echo "$ac_cv_lib_ncurses_initscr" >&6; }
3447if 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
3454fi
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; }
3407if ${ac_cv_path_GREP+:} false; then : 3461if ${ac_cv_path_GREP+:} false; then :