Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf test for gcc pch support



Here is the test from libstdc++ in gcc (from the mainline, cvs version, Note this is under the GPL and copyrighted by the FSF):
------------------------------------------------------------------------ -----
dnl
dnl Check to see if building and using a C++ precompiled header can be done.
dnl
dnl GLIBCPP_CHECK_PCH
dnl
dnl If it looks like it may work, flip bits on in include/Makefile.am
dnl
AC_DEFUN(GLIBCPP_CHECK_PCH, [
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header'

AC_MSG_CHECKING([for compiler that seems to compile .gch files])
if test x${glibcpp_pch_comp+set} != xset; then
AC_CACHE_VAL(glibcpp_pch_comp, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h>
],
[ $1(0);],
[glibcpp_pch_comp=yes], [glibcpp_pch_comp=no])
AC_LANG_RESTORE
])
fi
AC_MSG_RESULT([$glibcpp_pch_comp])

CXXFLAGS="$ac_save_CXXFLAGS"
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "$glibcpp_pch_comp" = yes)
if test "$glibcpp_pch_comp" = yes; then
glibcpp_PCHFLAGS="-include bits/stdc++.h"
else
glibcpp_PCHFLAGS=""
fi
AC_SUBST(glibcpp_PCHFLAGS)
])
-------------------------------- cut------------------------------------------

Thanks,
Andrew Pinski



On Monday, Jun 30, 2003, at 16:04 US/Eastern, Gilles Depeyrot wrote:

Hi,

Does anyone have information/code on how to perform
autoconf/configure tests for gcc pch (precompiled header)
support provided by GCC 3.3?

Best regards,
Gilles

--
Gilles Depeyrot <mailto:email@hidden>
<http://perso.wanadoo.fr/gilles.depeyrot>
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >autoconf test for gcc pch support (From: Gilles Depeyrot <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.