This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to configure.in
- To: jason at cygnus dot com
- Subject: Re: Patch to configure.in
- From: Manfred Hollstein <manfred at s-direktnet dot de>
- Date: Tue, 28 Jul 1998 10:26:09 +0200 (MET DST)
- Cc: egcs-patches at cygnus dot com
- References: <199807280727.AAA17180@yorick.cygnus.com>
- Reply-To: manfred at s-direktnet dot de, Manfred dot Hollstein at ks dot sel dot alcatel dot de
On Tue, 28 July 1998, 00:27:19, jason@cygnus.com wrote:
> 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.
>
As gxx-include-dir is used e.g. in the libstdc++ and libio directories
as well, I suggest moving the check to the toplevel configure script
or to add a check there, too. Perhaps we should also add relative path
names as "bad values".
manfred
> 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