Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 579b72c

Browse files
committed
Run AC_PROG_GCC_TRADITIONAL only when running AC_PROG_CC,
ie, not when user specifies --with-CC. This corrects a scripting error that I'm surprised hasn't been reported more often. Moving the macro call to the earlier point in the script is correct anyway: if -traditional is needed, it should get added to CFLAGS before we start using the compiler for other tests.
1 parent 9e38dcf commit 579b72c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/configure.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ AC_ARG_WITH(CC,
335335
esac
336336
CC="$withval"
337337
],
338-
[ AC_PROG_CC])
338+
[
339+
AC_PROG_CC
340+
AC_PROG_GCC_TRADITIONAL
341+
])
339342

340343
if test "$CC" = "gcc"
341344
then
@@ -346,11 +349,9 @@ fi
346349
AC_SUBST(CC_VERSION)
347350

348351
CPPFLAGS="$CPPFLAGS $PGSQL_CPPFLAGS"
349-
export CPPFLAGS
350352
echo "- setting CPPFLAGS=$CPPFLAGS"
351353

352354
LDFLAGS="$LDFLAGS $PGSQL_LDFLAGS"
353-
export LDFLAGS
354355
echo "- setting LDFLAGS=$LDFLAGS"
355356

356357
dnl Checks for programs.
@@ -668,7 +669,6 @@ main() {
668669
AC_MSG_RESULT(assuming not on target machine))
669670

670671
dnl Checks for library functions.
671-
AC_PROG_GCC_TRADITIONAL
672672
AC_FUNC_MEMCMP
673673
AC_TYPE_SIGNAL
674674
AC_FUNC_VPRINTF

0 commit comments

Comments
 (0)