[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] resubmitting fix for --enable-debug configuration option and -g compiler switch

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-09-03 22:24:54 CEST

Marc Singer <elf@buici.com> writes:

> I've looked deeper into the configure script and found that
> --enable-debug is intended to enable debug symbols in build targets.

Not strictly accurate, it's AC_PROG_CC that should enable debug
symbols, even without --enable-debug. What --enable-debug does is to
remove optimisation.

> But, it is foiled by the APR macros which define CFLAGS and block the
> inclusion of the 'default' CFLAGS switches produced by AC_PROG_CC.
> This is fixed by by moving the AC_PROG_CC macro to preceed the APR
> macros.
>
> Some folks may have never experienced this problem. That could be due
> to either a) a lack of APR in the build environment or b) definition
> of CFLAGS in their environment.

I suspect the reason that other people don't see this is that APR will
often be compiled with the same CFLAGS as Subversion, so when apr.m4
sets CFLAGS it sets it to the value one would expect AC_PROG_CC to
produce.

> Log:
>
> Moved the AC_PROG_CC directive above the APR macros. Fixes the -g
> switch inclusion when building with apr.
>
> * configure.in: Moved AC_PROG_CC closer to top of file.

I was going to commit this, but then I discovered that it breaks the
config.nice generation. Instead of a copy of the configure command I
get

$ cat config.nice
#! /bin/sh
#
# Created by configure

"../svn/configure" \
"dummy" \
"gcc" \
"$@"

I don't know why this happens.

> Index: configure.in
> ===================================================================
> --- configure.in (revision 6949)
> +++ configure.in (working copy)
> @@ -49,6 +49,9 @@
> MKDIR="$INSTALL -d"
> AC_SUBST(MKDIR)
>
> +dnl Look for a C compiler early so that we get the -g switch
> +AC_PROG_CC
> +
> dnl Grab our own macros
> sinclude(build/ac-macros/berkeley-db.m4)
> sinclude(build/ac-macros/svn-apache.m4)
> @@ -175,9 +178,6 @@
>
> dnl Check for programs ---------------------
>
> -dnl Look for a C compiler
> -AC_PROG_CC
> -
> dnl Look for a C pre-processor
> AC_PROG_CPP

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 3 22:25:50 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.