Changeset 1179
- Timestamp:
- 01/01/08 03:58:03 (8 months ago)
- Files:
-
- 1.8.3/branches/devel/aclocal.m4 (modified) (1 diff)
- 1.8.3/branches/devel/config.guess (added)
- 1.8.3/branches/devel/config.sub (added)
- 1.8.3/branches/devel/configure (modified) (7 diffs)
- 1.8.3/branches/devel/configure.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/branches/devel/aclocal.m4
r1143 r1179 978 978 AC_SUBST([PCRE_CFLAGS]) 979 979 ]) 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 1080 AC_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 1098 EOF 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 651 651 host_alias 652 652 target_alias 653 build 654 build_cpu 655 build_vendor 656 build_os 657 host 658 host_cpu 659 host_vendor 660 host_os 653 661 CAT 654 662 CC … … 1266 1274 1267 1275 cat <<\_ACEOF 1276 1277 System types: 1278 --build=BUILD configure for building on BUILD [guessed] 1279 --host=HOST cross-compile to build programs to run on HOST [BUILD] 1268 1280 _ACEOF 1269 1281 fi … … 1729 1741 ac_config_headers="$ac_config_headers config.h" 1730 1742 1743 ac_aux_dir= 1744 for 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 1758 done 1759 if test -z "$ac_aux_dir"; then 1760 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 1761 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} 1762 { (exit 1); exit 1; }; } 1763 fi 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. 1769 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 1770 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 1771 ac_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 1777 echo "$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 1781 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } 1782 if test "${ac_cv_build+set}" = set; then 1783 echo $ECHO_N "(cached) $ECHO_C" >&6 1784 else 1785 ac_build_alias=$build_alias 1786 test "x$ac_build_alias" = x && 1787 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 1788 test "x$ac_build_alias" = x && 1789 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 1790 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} 1791 { (exit 1); exit 1; }; } 1792 ac_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 1794 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} 1795 { (exit 1); exit 1; }; } 1796 1797 fi 1798 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 1799 echo "${ECHO_T}$ac_cv_build" >&6; } 1800 case $ac_cv_build in 1801 *-*-*) ;; 1802 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 1803 echo "$as_me: error: invalid value of canonical build" >&2;} 1804 { (exit 1); exit 1; }; };; 1805 esac 1806 build=$ac_cv_build 1807 ac_save_IFS=$IFS; IFS='-' 1808 set x $ac_cv_build 1809 shift 1810 build_cpu=$1 1811 build_vendor=$2 1812 shift; shift 1813 # Remember, the first character of IFS is used to create $*, 1814 # except with old shells: 1815 build_os=$* 1816 IFS=$ac_save_IFS 1817 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 1818 1819 1820 { echo "$as_me:$LINENO: checking host system type" >&5 1821 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } 1822 if test "${ac_cv_host+set}" = set; then 1823 echo $ECHO_N "(cached) $ECHO_C" >&6 1824 else 1825 if test "x$host_alias" = x; then 1826 ac_cv_host=$ac_cv_build 1827 else 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 1830 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} 1831 { (exit 1); exit 1; }; } 1832 fi 1833 1834 fi 1835 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 1836 echo "${ECHO_T}$ac_cv_host" >&6; } 1837 case $ac_cv_host in 1838 *-*-*) ;; 1839 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 1840 echo "$as_me: error: invalid value of canonical host" >&2;} 1841 { (exit 1); exit 1; }; };; 1842 esac 1843 host=$ac_cv_host 1844 ac_save_IFS=$IFS; IFS='-' 1845 set x $ac_cv_host 1846 shift 1847 host_cpu=$1 1848 host_vendor=$2 1849 shift; shift 1850 # Remember, the first character of IFS is used to create $*, 1851 # except with old shells: 1852 host_os=$* 1853 IFS=$ac_save_IFS 1854 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 1855 1856 1731 1857 1732 1858 if test "x$CFLAGS" = "x"; then … … 2963 3089 fi 2964 3090 3091 3092 3093 3094 { echo "$as_me:$LINENO: checking if gcc accepts -fstack-protector option" >&5 3095 echo $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 3106 else 3107 3108 ax_gcc_option_test="" 3109 3110 fi 3111 3112 3113 # Dump the test program to file 3114 cat <<EOF > conftest.c 3115 $ax_gcc_option_test 3116 EOF 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 3134 echo "${ECHO_T}yes" >&6; } 3135 3136 CFLAGS="$CFLAGS -fstack-protector" 3137 3138 3139 else 3140 3141 { echo "$as_me:$LINENO: result: no" >&5 3142 echo "${ECHO_T}no" >&6; } 3143 3144 3145 fi 3146 3147 3148 else 3149 3150 { echo "$as_me:$LINENO: result: no gcc available" >&5 3151 echo "${ECHO_T}no gcc available" >&6; } 3152 3153 fi 3154 3155 3156 3157 2965 3158 # Extract the first word of "chmod", so it can be a program name with args. 2966 3159 set dummy chmod; ac_word=$2 … … 3081 3274 echo "${ECHO_T}no" >&6; } 3082 3275 fi 3083 3084 3085 ac_aux_dir=3086 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do3087 if test -f "$ac_dir/install-sh"; then3088 ac_aux_dir=$ac_dir3089 ac_install_sh="$ac_aux_dir/install-sh -c"3090 break3091 elif test -f "$ac_dir/install.sh"; then3092 ac_aux_dir=$ac_dir3093 ac_install_sh="$ac_aux_dir/install.sh -c"3094 break3095 elif test -f "$ac_dir/shtool"; then3096 ac_aux_dir=$ac_dir3097 ac_install_sh="$ac_aux_dir/shtool install -c"3098 break3099 fi3100 done3101 if test -z "$ac_aux_dir"; then3102 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&53103 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}3104 { (exit 1); exit 1; }; }3105 fi3106 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 directory3110 # 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.3114 3276 3115 3277 … … 16882 17044 host_alias!$host_alias$ac_delim 16883 17045 target_alias!$target_alias$ac_delim 17046 build!$build$ac_delim 17047 build_cpu!$build_cpu$ac_delim 17048 build_vendor!$build_vendor$ac_delim 17049 build_os!$build_os$ac_delim 17050 host!$host$ac_delim 17051 host_cpu!$host_cpu$ac_delim 17052 host_vendor!$host_vendor$ac_delim 17053 host_os!$host_os$ac_delim 16884 17054 CAT!$CAT$ac_delim 16885 17055 CC!$CC$ac_delim … … 16930 17100 _ACEOF 16931 17101 16932 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 83; then17102 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then 16933 17103 break 16934 17104 elif $ac_last_try; then 1.8.3/branches/devel/configure.in
r1164 r1179 7 7 AC_INIT(configure.in) 8 8 AC_CONFIG_HEADERS(config.h) 9 AC_CANONICAL_HOST 9 10 10 11 if test "x$CFLAGS" = "x"; then … … 39 40 fi 40 41 fi 42 43 AX_GCC_OPTION([-fstack-protector], [], [], [ 44 CFLAGS="$CFLAGS -fstack-protector" 45 ], []) 46 41 47 42 48 AC_PATH_PROG(CHMOD, chmod)
