comparison configure.ac @ 2992:fd7c5f4f2983

[xemacs-hg @ 2005-10-14 01:00:44 by ben] fix optimization handling in configure.ac configure.ac: Break lines. configure.ac: Rewrite optimization help to be accurate. Setting `--with-cflags-optimization=""' will now unilaterally turn off optimization; setting it to something non-null unilaterally turns it on.
author ben
date Fri, 14 Oct 2005 01:00:45 +0000
parents 414a64af46c9
children fcf2f05d0c7a
comparison
equal deleted inserted replaced
2991:f79d0f6892f5 2992:fd7c5f4f2983
755 AC_ARG_WITH([compiler], 755 AC_ARG_WITH([compiler],
756 AC_HELP_STRING([--with-compiler],[C compiler to use]), 756 AC_HELP_STRING([--with-compiler],[C compiler to use]),
757 [], []) 757 [], [])
758 758
759 AC_ARG_WITH([xemacs-compiler], 759 AC_ARG_WITH([xemacs-compiler],
760 AC_HELP_STRING([--with-xemacs-compiler],[compiler to use to compile just the xemacs executable and C modules. 760 AC_HELP_STRING([--with-xemacs-compiler],
761 [compiler to use to compile just the xemacs executable and C modules.
761 If you want to compile XEmacs as C++, use e.g. 762 If you want to compile XEmacs as C++, use e.g.
762 `--with-xemacs-compiler=g++'. This turns on a lot of 763 `--with-xemacs-compiler=g++'. This turns on a lot of
763 additional error-checking.]), 764 additional error-checking.]),
764 [], []) 765 [], [])
765 766
766 AC_ARG_WITH([cflags], 767 AC_ARG_WITH([cflags],
767 AC_HELP_STRING([--with-cflags],[Compiler flags (such as -O); setting this overrides 768 AC_HELP_STRING([--with-cflags],
768 all default compiler flags except those that control 769 [Compiler flags. These flags will be placed after any flags inserted for warnings, debugging or optimization; setting this does not disable the insertion of those flags. Use configure settings such as `--with-optimization=no' or `enable-debug=no' to turn them off, or override them with `--with-cflags-optimization', `--with-cflags-debugging', or `with-cflags-warning'.]),
769 warnings.]),
770 [], []) 770 [], [])
771 771
772 AC_ARG_WITH([cflags-warning], 772 AC_ARG_WITH([cflags-warning],
773 AC_HELP_STRING([--with-cflags-warning],[Override compiler flags used to control warnings. 773 AC_HELP_STRING([--with-cflags-warning],[Override compiler flags used to control warnings.
774 Normally, don't set this, as XEmacs already turns on 774 Normally, don't set this, as XEmacs already turns on
775 the maximum safe warning level.]), 775 the maximum safe warning level.]),
776 [], []) 776 [], [])
777 777
778 AC_ARG_WITH([cflags-optimization], 778 AC_ARG_WITH([cflags-optimization],
779 AC_HELP_STRING([--with-cflags-optimization=FLAGS], 779 AC_HELP_STRING([--with-cflags-optimization=FLAGS],
780 [Override compiler flags used to control optimization. Only has an effect when optimization is enabled. Normally, don't set this, as XEmacs will already set the maximum safe optimization flags appropriate for the compiler being invoked.]), 780 [Override compiler flags used to control optimization. If blank, forces no optimization; if non-blank, forces optimization. Normally, don't set this; XEmacs automatically sets the maximum safe optimization flags appropriate for the compiler being invoked. If you just want to turn optimization on or off, use `with-optimization' instead.]),
781 [], []) 781 [], [])
782 782
783 AC_ARG_WITH([cflags-debugging], 783 AC_ARG_WITH([cflags-debugging],
784 AC_HELP_STRING([--with-cflags-debugging=FLAGS], 784 AC_HELP_STRING([--with-cflags-debugging=FLAGS],
785 [Override compiler flags used to add debugging information to the executable. Normally, debugging information is added whenever possible (i.e. unless optimization is turned on and the compiler does not permit debugging and optimization simultaneously).]), 785 [Override compiler flags used to add debugging information to the executable. Normally, debugging information is added whenever possible (i.e. unless optimization is turned on and the compiler does not permit debugging and optimization simultaneously).]),
2072 2072
2073 dnl Calculate optimization flags. These will be off by default in beta 2073 dnl Calculate optimization flags. These will be off by default in beta
2074 dnl versions and on in release versions. 2074 dnl versions and on in release versions.
2075 2075
2076 if test -z "$with_optimization"; then 2076 if test -z "$with_optimization"; then
2077 if test -z "$emacs_is_beta" -o "$cflags_optimization_specified" = "yes"; then 2077 # If user set --with-cflags-optimization, use it to unilaterally
2078 # determine whether optimization should be enabled.
2079 if test "$cflags_optimization_specified" = "yes" ; then
2080 if -z "$with_cflags_optimization" ; then
2081 with_optimization=no
2082 else
2083 with_optimization=yes
2084 fi
2085 elif test -z "$emacs_is_beta" ; then
2078 with_optimization=yes 2086 with_optimization=yes
2079 else 2087 else
2080 with_optimization=no 2088 with_optimization=no
2081 fi 2089 fi
2082 fi 2090 fi