PennMUSH Community

Changeset 1179

Show
Ignore:
Timestamp:
01/01/08 03:58:03 (8 months ago)
Author:
shawnw
Message:

Added config.guess and config.sub for host type detection.
Added configure check for gcc 4.2's -fstack-protector option.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/branches/devel/aclocal.m4

    r1143 r1179  
    978978AC_SUBST([PCRE_CFLAGS]) 
    979979]) 
     980##### http://autoconf-archive.cryp.to/ax_gcc_option.html 
     981# 
     982# SYNOPSIS 
     983# 
     984#   AX_GCC_OPTION(OPTION,EXTRA-OPTIONS,TEST-PROGRAM,ACTION-IF-SUCCESSFUL,ACTION-IF-NOT-SUCCESFUL) 
     985# 
     986# DESCRIPTION 
     987# 
     988#   AX_GCC_OPTION checks wheter gcc accepts the passed OPTION. If it 
     989#   accepts the OPTION then ACTION-IF-SUCCESSFUL will be executed, 
     990#   otherwise ACTION-IF-UNSUCCESSFUL. 
     991# 
     992#   NOTE: This macro will be obsoleted by AX_C_CHECK_FLAG 
     993#   AX_CXX_CHECK_FLAG, AX_CPP_CHECK_FLAG, AX_CXXCPP_CHECK_FLAG and 
     994#   AX_LD_CHECK_FLAG. 
     995# 
     996#   A typical usage should be the following one: 
     997# 
     998#     AX_GCC_OPTION([-fomit-frame-pointer],[],[],[ 
     999#       AC_MSG_NOTICE([The option is supported])],[ 
     1000#       AC_MSG_NOTICE([No luck this time]) 
     1001#     ]) 
     1002# 
     1003#   The macro doesn't discriminate between languages so, if you are 
     1004#   testing for an option that works for C++ but not for C you should 
     1005#   use '-x c++' as EXTRA-OPTIONS: 
     1006# 
     1007#     AX_GCC_OPTION([-fno-rtti],[-x c++],[],[ ... ],[ ... ]) 
     1008# 
     1009#   OPTION is tested against the following code: 
     1010# 
     1011#     int main() 
     1012#     { 
     1013#             return 0; 
     1014#     } 
     1015# 
     1016#   The optional TEST-PROGRAM comes handy when the default main() is 
     1017#   not suited for the option being checked 
     1018# 
     1019#   So, if you need to test for -fstrict-prototypes option you should 
     1020#   probably use the macro as follows: 
     1021# 
     1022#     AX_GCC_OPTION([-fstrict-prototypes],[-x c++],[ 
     1023#       int main(int argc, char ** argv) 
     1024#       { 
     1025#           (void) argc; 
     1026#           (void) argv; 
     1027# 
     1028#           return 0; 
     1029#       } 
     1030#     ],[ ... ],[ ... ]) 
     1031# 
     1032#   Note that the macro compiles but doesn't link the test program so 
     1033#   it is not suited for checking options that are passed to the 
     1034#   linker, like: 
     1035# 
     1036#     -Wl,-L<a-library-path> 
     1037# 
     1038#   In order to avoid such kind of problems you should think about 
     1039#   usinguse the AX_*_CHECK_FLAG family macros 
     1040# 
     1041# LAST MODIFICATION 
     1042# 
     1043#   2007-11-26 
     1044# 
     1045# COPYLEFT 
     1046# 
     1047#   Copyright (c) 2007 Francesco Salvestrini <salvestrini@users.sourceforge.net> 
     1048#   Copyright (c) 2007 Bogdan Drozdowski <bogdandr@op.pl> 
     1049# 
     1050#   This program is free software; you can redistribute it and/or 
     1051#   modify it under the terms of the GNU General Public License as 
     1052#   published by the Free Software Foundation; either version 2 of the 
     1053#   License, or (at your option) any later version. 
     1054# 
     1055#   This program is distributed in the hope that it will be useful, but 
     1056#   WITHOUT ANY WARRANTY; without even the implied warranty of 
     1057#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
     1058#   General Public License for more details. 
     1059# 
     1060#   You should have received a copy of the GNU General Public License 
     1061#   along with this program; if not, write to the Free Software 
     1062#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     1063#   02111-1307, USA. 
     1064# 
     1065#   As a special exception, the respective Autoconf Macro's copyright 
     1066#   owner gives unlimited permission to copy, distribute and modify the 
     1067#   configure scripts that are the output of Autoconf when processing 
     1068#   the Macro. You need not follow the terms of the GNU General Public 
     1069#   License when using or distributing such scripts, even though 
     1070#   portions of the text of the Macro appear in them. The GNU General 
     1071#   Public License (GPL) does govern all other use of the material that 
     1072#   constitutes the Autoconf Macro. 
     1073# 
     1074#   This special exception to the GPL applies to versions of the 
     1075#   Autoconf Macro released by the Autoconf Macro Archive. When you 
     1076#   make and distribute a modified version of the Autoconf Macro, you 
     1077#   may extend this special exception to the GPL to apply to your 
     1078#   modified version as well. 
     1079 
     1080AC_DEFUN([AX_GCC_OPTION], [ 
     1081  AC_REQUIRE([AC_PROG_CC]) 
     1082 
     1083  AC_MSG_CHECKING([if gcc accepts $1 option]) 
     1084 
     1085  AS_IF([ test "x$GCC" = "xyes" ],[ 
     1086    AS_IF([ test -z "$3" ],[ 
     1087      ax_gcc_option_test="int main() 
     1088{ 
     1089    return 0; 
     1090}" 
     1091    ],[ 
     1092      ax_gcc_option_test="$3" 
     1093    ]) 
     1094 
     1095    # Dump the test program to file 
     1096    cat <<EOF > conftest.c 
     1097$ax_gcc_option_test 
     1098EOF 
     1099 
     1100    # Dump back the file to the log, useful for debugging purposes 
     1101    AC_TRY_COMMAND(cat conftest.c 1>&AS_MESSAGE_LOG_FD) 
     1102 
     1103    AS_IF([ AC_TRY_COMMAND($CC $2 $1 -c conftest.c 1>&AS_MESSAGE_LOG_FD) ],[ 
     1104            AC_MSG_RESULT([yes]) 
     1105        $4 
     1106    ],[ 
     1107        AC_MSG_RESULT([no]) 
     1108        $5 
     1109    ]) 
     1110  ],[ 
     1111    AC_MSG_RESULT([no gcc available]) 
     1112  ]) 
     1113]) 
  • 1.8.3/branches/devel/configure

    r1164 r1179  
    651651host_alias 
    652652target_alias 
     653build 
     654build_cpu 
     655build_vendor 
     656build_os 
     657host 
     658host_cpu 
     659host_vendor 
     660host_os 
    653661CAT 
    654662CC 
     
    12661274 
    12671275  cat <<\_ACEOF 
     1276 
     1277System types: 
     1278  --build=BUILD     configure for building on BUILD [guessed] 
     1279  --host=HOST       cross-compile to build programs to run on HOST [BUILD] 
    12681280_ACEOF 
    12691281fi 
     
    17291741ac_config_headers="$ac_config_headers config.h" 
    17301742 
     1743ac_aux_dir= 
     1744for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 
     1745  if test -f "$ac_dir/install-sh"; then 
     1746    ac_aux_dir=$ac_dir 
     1747    ac_install_sh="$ac_aux_dir/install-sh -c" 
     1748    break 
     1749  elif test -f "$ac_dir/install.sh"; then 
     1750    ac_aux_dir=$ac_dir 
     1751    ac_install_sh="$ac_aux_dir/install.sh -c" 
     1752    break 
     1753  elif test -f "$ac_dir/shtool"; then 
     1754    ac_aux_dir=$ac_dir 
     1755    ac_install_sh="$ac_aux_dir/shtool install -c" 
     1756    break 
     1757  fi 
     1758done 
     1759if test -z "$ac_aux_dir"; then 
     1760  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 
     1761echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} 
     1762   { (exit 1); exit 1; }; } 
     1763fi 
     1764 
     1765# These three variables are undocumented and unsupported, 
     1766# and are intended to be withdrawn in a future Autoconf release. 
     1767# They can cause serious problems if a builder's source tree is in a directory 
     1768# whose full name contains unusual characters. 
     1769ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var. 
     1770ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var. 
     1771ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var. 
     1772 
     1773 
     1774# Make sure we can run config.sub. 
     1775$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 
     1776  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 
     1777echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} 
     1778   { (exit 1); exit 1; }; } 
     1779 
     1780{ echo "$as_me:$LINENO: checking build system type" >&5 
     1781echo $ECHO_N "checking build system type... $ECHO_C" >&6; } 
     1782if test "${ac_cv_build+set}" = set; then 
     1783  echo $ECHO_N "(cached) $ECHO_C" >&6 
     1784else 
     1785  ac_build_alias=$build_alias 
     1786test "x$ac_build_alias" = x && 
     1787  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 
     1788test "x$ac_build_alias" = x && 
     1789  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 
     1790echo "$as_me: error: cannot guess build type; you must specify one" >&2;} 
     1791   { (exit 1); exit 1; }; } 
     1792ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 
     1793  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 
     1794echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} 
     1795   { (exit 1); exit 1; }; } 
     1796 
     1797fi 
     1798{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 
     1799echo "${ECHO_T}$ac_cv_build" >&6; } 
     1800case $ac_cv_build in 
     1801*-*-*) ;; 
     1802*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 
     1803echo "$as_me: error: invalid value of canonical build" >&2;} 
     1804   { (exit 1); exit 1; }; };; 
     1805esac 
     1806build=$ac_cv_build 
     1807ac_save_IFS=$IFS; IFS='-' 
     1808set x $ac_cv_build 
     1809shift 
     1810build_cpu=$1 
     1811build_vendor=$2 
     1812shift; shift 
     1813# Remember, the first character of IFS is used to create $*, 
     1814# except with old shells: 
     1815build_os=$* 
     1816IFS=$ac_save_IFS 
     1817case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 
     1818 
     1819 
     1820{ echo "$as_me:$LINENO: checking host system type" >&5 
     1821echo $ECHO_N "checking host system type... $ECHO_C" >&6; } 
     1822if test "${ac_cv_host+set}" = set; then 
     1823  echo $ECHO_N "(cached) $ECHO_C" >&6 
     1824else 
     1825  if test "x$host_alias" = x; then 
     1826  ac_cv_host=$ac_cv_build 
     1827else 
     1828  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 
     1829    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 
     1830echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} 
     1831   { (exit 1); exit 1; }; } 
     1832fi 
     1833 
     1834fi 
     1835{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 
     1836echo "${ECHO_T}$ac_cv_host" >&6; } 
     1837case $ac_cv_host in 
     1838*-*-*) ;; 
     1839*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 
     1840echo "$as_me: error: invalid value of canonical host" >&2;} 
     1841   { (exit 1); exit 1; }; };; 
     1842esac 
     1843host=$ac_cv_host 
     1844ac_save_IFS=$IFS; IFS='-' 
     1845set x $ac_cv_host 
     1846shift 
     1847host_cpu=$1 
     1848host_vendor=$2 
     1849shift; shift 
     1850# Remember, the first character of IFS is used to create $*, 
     1851# except with old shells: 
     1852host_os=$* 
     1853IFS=$ac_save_IFS 
     1854case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 
     1855 
     1856 
    17311857 
    17321858if test "x$CFLAGS" = "x"; then 
     
    29633089fi 
    29643090 
     3091 
     3092 
     3093 
     3094  { echo "$as_me:$LINENO: checking if gcc accepts -fstack-protector option" >&5 
     3095echo $ECHO_N "checking if gcc accepts -fstack-protector option... $ECHO_C" >&6; } 
     3096 
     3097  if  test "x$GCC" = "xyes" ; then 
     3098 
     3099    if  test -z "" ; then 
     3100 
     3101      ax_gcc_option_test="int main() 
     3102{ 
     3103    return 0; 
     3104}" 
     3105 
     3106else 
     3107 
     3108      ax_gcc_option_test="" 
     3109 
     3110fi 
     3111 
     3112 
     3113    # Dump the test program to file 
     3114    cat <<EOF > conftest.c 
     3115$ax_gcc_option_test 
     3116EOF 
     3117 
     3118    # Dump back the file to the log, useful for debugging purposes 
     3119    { ac_try='cat conftest.c 1>&5' 
     3120  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3121  (eval $ac_try) 2>&5 
     3122  ac_status=$? 
     3123  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3124  (exit $ac_status); }; } 
     3125 
     3126    if  { ac_try='$CC  -fstack-protector -c conftest.c 1>&5' 
     3127  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3128  (eval $ac_try) 2>&5 
     3129  ac_status=$? 
     3130  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3131  (exit $ac_status); }; } ; then 
     3132 
     3133            { echo "$as_me:$LINENO: result: yes" >&5 
     3134echo "${ECHO_T}yes" >&6; } 
     3135 
     3136                   CFLAGS="$CFLAGS -fstack-protector" 
     3137 
     3138 
     3139else 
     3140 
     3141        { echo "$as_me:$LINENO: result: no" >&5 
     3142echo "${ECHO_T}no" >&6; } 
     3143 
     3144 
     3145fi 
     3146 
     3147 
     3148else 
     3149 
     3150    { echo "$as_me:$LINENO: result: no gcc available" >&5 
     3151echo "${ECHO_T}no gcc available" >&6; } 
     3152 
     3153fi 
     3154 
     3155 
     3156 
     3157 
    29653158# Extract the first word of "chmod", so it can be a program name with args. 
    29663159set dummy chmod; ac_word=$2 
     
    30813274echo "${ECHO_T}no" >&6; } 
    30823275fi 
    3083  
    3084  
    3085 ac_aux_dir= 
    3086 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 
    3087   if test -f "$ac_dir/install-sh"; then 
    3088     ac_aux_dir=$ac_dir 
    3089     ac_install_sh="$ac_aux_dir/install-sh -c" 
    3090     break 
    3091   elif test -f "$ac_dir/install.sh"; then 
    3092     ac_aux_dir=$ac_dir 
    3093     ac_install_sh="$ac_aux_dir/install.sh -c" 
    3094     break 
    3095   elif test -f "$ac_dir/shtool"; then 
    3096     ac_aux_dir=$ac_dir 
    3097     ac_install_sh="$ac_aux_dir/shtool install -c" 
    3098     break 
    3099   fi 
    3100 done 
    3101 if test -z "$ac_aux_dir"; then 
    3102   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 
    3103 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} 
    3104    { (exit 1); exit 1; }; } 
    3105 fi 
    3106  
    3107 # These three variables are undocumented and unsupported, 
    3108 # and are intended to be withdrawn in a future Autoconf release. 
    3109 # They can cause serious problems if a builder's source tree is in a directory 
    3110 # whose full name contains unusual characters. 
    3111 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var. 
    3112 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var. 
    3113 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var. 
    31143276 
    31153277 
     
    1688217044host_alias!$host_alias$ac_delim 
    1688317045target_alias!$target_alias$ac_delim 
     17046build!$build$ac_delim 
     17047build_cpu!$build_cpu$ac_delim 
     17048build_vendor!$build_vendor$ac_delim 
     17049build_os!$build_os$ac_delim 
     17050host!$host$ac_delim 
     17051host_cpu!$host_cpu$ac_delim 
     17052host_vendor!$host_vendor$ac_delim 
     17053host_os!$host_os$ac_delim 
    1688417054CAT!$CAT$ac_delim 
    1688517055CC!$CC$ac_delim 
     
    1693017100_ACEOF 
    1693117101 
    16932   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 83; then 
     17102  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then 
    1693317103    break 
    1693417104  elif $ac_last_try; then 
  • 1.8.3/branches/devel/configure.in

    r1164 r1179  
    77AC_INIT(configure.in) 
    88AC_CONFIG_HEADERS(config.h) 
     9AC_CANONICAL_HOST 
    910 
    1011if test "x$CFLAGS" = "x"; then 
     
    3940 fi 
    4041fi 
     42 
     43AX_GCC_OPTION([-fstack-protector], [], [], [ 
     44                   CFLAGS="$CFLAGS -fstack-protector" 
     45                   ], []) 
     46                    
    4147 
    4248AC_PATH_PROG(CHMOD, chmod)