Use "-no-cpp-precomp" rather than "-traditional-cpp" on MacOS X, as per
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 7 Dec 2001 22:56:58 +0000 (22:56 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 7 Dec 2001 22:56:58 +0000 (22:56 +0000)
the "The Compiler and Tools" section on

http://fink.sourceforge.net/doc/porting/basics.php

Do so on MacOS X regardless of whether the compiler is called "gcc" or
not, as that page also indicates that the compiler is installed as "cc".

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4354 f5534014-38df-0310-8fa8-9805f1628bb7

configure.in
epan/configure.in
wiretap/configure.in

index dd9944048505f664efb759e9c87392d7235f5636..b292481b2ca9ab850b3c218b287567a8b3a7a2c4 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.140 2001/11/02 10:01:00 guy Exp $
+# $Id: configure.in,v 1.141 2001/12/07 22:56:56 guy Exp $
 dnl
 dnl Process this file with autoconf 2.13 or later to produce a
 dnl configure script; 2.12 doesn't generate a "configure" script that
@@ -109,6 +109,17 @@ then
                CFLAGS="-Ae +O2 $CFLAGS"
                AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
                ;;
+       darwin*)
+               #
+               # It may be called "cc", but it's really a GCC derivative
+               # with a problematic special precompiler and precompiled
+               # headers; turn off the special precompiler, as some
+               # apparently-legal code won't compile with its precompiled
+               # headers.
+               #
+               CFLAGS="-no-cpp-precomp $CFLAGS"
+               AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
+               ;;
        *)
                AC_MSG_RESULT(none needed)
                ;;
@@ -122,8 +133,11 @@ else
                AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15)
                ;;
        darwin*)
-               CFLAGS="-traditional-cpp $CFLAGS"
-               AC_MSG_RESULT(Apple cc compiler - added -traditional-cpp)
+               #
+               # See comments above about Apple's lovely C compiler.
+               #
+               CFLAGS="-no-cpp-precomp $CFLAGS"
+               AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
                ;;
        *)
                AC_MSG_RESULT(none needed)
index 872061c11b6210a5a16f793a55b279559368a9d5..460e9a4fee9e5502093f243dd078a26eed9493b2 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.14 2001/10/28 01:27:59 guy Exp $
+# $Id: configure.in,v 1.15 2001/12/07 22:56:57 guy Exp $
 dnl
 dnl Process this file with autoconf 2.13 or later to produce a
 dnl configure script; 2.12 doesn't generate a "configure" script that
@@ -57,6 +57,17 @@ then
                CFLAGS="-Ae +O2 $CFLAGS"
                AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
                ;;
+       darwin*)
+               #
+               # It may be called "cc", but it's really a GCC derivative
+               # with a problematic special precompiler and precompiled
+               # headers; turn off the special precompiler, as some
+               # apparently-legal code won't compile with its precompiled
+               # headers.
+               #
+               CFLAGS="-no-cpp-precomp $CFLAGS"
+               AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
+               ;;
        *)
                AC_MSG_RESULT(none needed)
                ;;
@@ -64,8 +75,11 @@ then
 else
        case "$host_os" in
        darwin*)
-               CFLAGS="-traditional-cpp $CFLAGS"
-               AC_MSG_RESULT(Apple cc compiler - added -traditional-cpp)
+               #
+               # See comments above about Apple's lovely C compiler.
+               #
+               CFLAGS="-no-cpp-precomp $CFLAGS"
+               AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
                ;;
        *)
        AC_MSG_RESULT(none needed)
index 095cdfcac1cdf81da9e2fd420e9615b67222da23..634ddb7251d624ddadcc8421152e7dd8868393c5 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.30 2001/09/28 05:41:45 guy Exp $
+# $Id: configure.in,v 1.31 2001/12/07 22:56:58 guy Exp $
 dnl
 dnl Process this file with autoconf 2.13 or later to produce a
 dnl configure script; 2.12 doesn't generate a "configure" script that
@@ -56,15 +56,29 @@ then
                CFLAGS="-Ae +O2 $CFLAGS"
                AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
                ;;
+       darwin*)
+               #
+               # It may be called "cc", but it's really a GCC derivative
+               # with a problematic special precompiler and precompiled
+               # headers; turn off the special precompiler, as some
+               # apparently-legal code won't compile with its precompiled
+               # headers.
+               #
+               CFLAGS="-no-cpp-precomp $CFLAGS"
+               AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
+               ;;
        *)
                AC_MSG_RESULT(none needed)
                ;;
        esac
 else
-               case "$host_os" in
+       case "$host_os" in
        darwin*)
-               CFLAGS="-traditional-cpp $CFLAGS"
-               AC_MSG_RESULT(Apple cc compiler - added -traditional-cpp)
+               #
+               # See comments above about Apple's lovely C compiler.
+               #
+               CFLAGS="-no-cpp-precomp $CFLAGS"
+               AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
                ;;
        *)
        AC_MSG_RESULT(none needed)