Patch to configure.in
Jason Merrill
jason@cygnus.com
Tue Jul 28 00:27:00 GMT 1998
I noticed once that --disable-checking didn't work, that it turned checking
on instead of off. After some investigation, I found that the AC_ARG_*
macros execute the second argument for --disable as well as --enable. This
patch fixes the arguments that don't properly check for the "no" case. I
also added sanity checks; "yes" doesn't make much sense for a directory.
It might be useful to write the other option handlers more like this, as
well.
Tue Jul 28 00:20:33 1998 Jason Merrill <jason@yorick.cygnus.com>
* configure.in: Fix --without/--disable cases for local-prefix,
gxx-include-dir and checking.
Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.133
diff -c -p -r1.133 configure.in
*** configure.in 1998/07/27 11:56:11 1.133
--- configure.in 1998/07/28 07:21:23
*************** elf="$with_elf",
*** 56,85 ****
elf=no)
# Specify the local prefix
AC_ARG_WITH(local-prefix,
[ --with-local-prefix=DIR specifies directory to put local include.],
! local_prefix=$with_local_prefix,
! local_prefix=/usr/local)
# Default local prefix if it is empty
if [[ x$local_prefix = x ]]; then
local_prefix=/usr/local
fi
# Specify the g++ header file directory
AC_ARG_WITH(gxx-include-dir,
[ --with-gxx-include-dir=DIR
specifies directory to put g++ header files.],
! gxx_include_dir=$with_gxx_include_dir,
! if test x${enable_version_specific_runtime_libs} = xyes; then
! gxx_include_dir='${libsubdir}/include/g++'
! else gxx_include_dir='${prefix}/include/g++'; fi)
# Enable expensive internal checks
AC_ARG_ENABLE(checking,
[ --enable-checking enable expensive run-time checks.],
! AC_DEFINE(ENABLE_CHECKING)
! )
# Enable use of cpplib for C.
cpp_main=cccp
--- 56,102 ----
elf=no)
# Specify the local prefix
+ local_prefix=
AC_ARG_WITH(local-prefix,
[ --with-local-prefix=DIR specifies directory to put local include.],
! [case "${withval}" in
! yes) AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;;
! no) ;;
! *) local_prefix=$with_local_prefix ;;
! esac])
# Default local prefix if it is empty
if [[ x$local_prefix = x ]]; then
local_prefix=/usr/local
fi
+ gxx_include_dir=
# Specify the g++ header file directory
AC_ARG_WITH(gxx-include-dir,
[ --with-gxx-include-dir=DIR
specifies directory to put g++ header files.],
! [case "${withval}" in
! yes) AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;;
! no) ;;
! *) gxx_include_dir=$with_gxx_include_dir ;;
! esac])
+ if test x${gxx_include_dir} = x; then
+ if test x${enable_version_specific_runtime_libs} = xyes; then
+ gxx_include_dir='${libsubdir}/include/g++'
+ else
+ gxx_include_dir='${prefix}/include/g++'
+ fi
+ fi
+
# Enable expensive internal checks
AC_ARG_ENABLE(checking,
[ --enable-checking enable expensive run-time checks.],
! [case "${enableval}" in
! yes) AC_DEFINE(ENABLE_CHECKING) ;;
! no) ;;
! *) AC_MSG_ERROR(bad value ${enableval} given for checking option) ;;
! esac])
# Enable use of cpplib for C.
cpp_main=cccp
More information about the Gcc-patches
mailing list