Bug 426065 part 1 - use AC_CHECK_HEADERS to check for Windows headers that might not be present in various SDKs, r=ted a=beltzner
authorbenjamin@smedbergs.us
Tue, 15 Apr 2008 08:18:39 -0700
changeset 14341 9c292b69aec58a2a00a1258411ae978711034a38
parent 14340 d4b868d41659bc87f5428e1b94d9a9611b3f7b7b
child 14342 cd354c526a4281e600e1674c9f1512e7d50c8ab8
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, beltzner
bugs426065
milestone1.9pre
Bug 426065 part 1 - use AC_CHECK_HEADERS to check for Windows headers that might not be present in various SDKs, r=ted a=beltzner
configure.in
--- a/configure.in
+++ b/configure.in
@@ -181,17 +181,18 @@ MOZ_BUILD_ROOT=`pwd`
 dnl Default to MSVC for win32
 dnl ==============================================================
 if test -z "$CROSS_COMPILE"; then
 case "$target" in
 *-cygwin*|*-mingw*|*-msvc*|*-mks*)
     MAKE_VERSION=3.79
     if test -z "$CC"; then CC=cl; fi
     if test -z "$CXX"; then CXX=cl; fi
-    if test -z "$CPP"; then CPP=cl; fi
+    if test -z "$CPP"; then CPP="cl -E -nologo"; fi
+    if test -z "$CXXCPP"; then CXXCPP="cl -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi
     if test -z "$LD"; then LD=link; fi
     if test -z "$AS"; then AS=ml; fi
     if test -z "$MIDL"; then MIDL=midl; fi
     ;;
 esac
 fi
 
 COMPILE_ENVIRONMENT=1
@@ -588,38 +589,37 @@ case "$target" in
 
     AC_DEFINE_UNQUOTED(WINVER,0x$WINVER)
     AC_DEFINE_UNQUOTED(_WIN32_WINNT,0x$WINVER)
     # Require OS features provided by IE 5.0
     AC_DEFINE_UNQUOTED(_WIN32_IE,0x0500)
     ;;
 esac
 
-if test -n "$_WIN32_MSVC"; then
-    SKIP_PATH_CHECKS=1
-    SKIP_COMPILER_CHECKS=1
-    SKIP_LIBRARY_CHECKS=1
-    AC_CHECK_HEADERS(mmintrin.h)
-fi
-
 dnl Test breaks icc on OS/2 && MSVC
 if test "$CC" != "icc" -a -z "$_WIN32_MSVC"; then
     AC_PROG_CC_C_O
     if grep "NO_MINUS_C_MINUS_O 1" ./confdefs.h >/dev/null; then
         USING_HCC=1
         _OLDCC=$CC
         _OLDCXX=$CXX
         CC="${srcdir}/build/hcc '$CC'"
         CXX="${srcdir}/build/hcpp '$CXX'"
     fi
 fi
 
 AC_PROG_CPP
 AC_PROG_CXXCPP
 
+if test -n "$_WIN32_MSVC"; then
+    SKIP_PATH_CHECKS=1
+    SKIP_COMPILER_CHECKS=1
+    SKIP_LIBRARY_CHECKS=1
+fi
+
 fi # COMPILE_ENVIRONMENT
 
 AC_SUBST(MIDL_FLAGS)
 AC_SUBST(_MSC_VER)
 
 AC_SUBST(GNU_AS)
 AC_SUBST(GNU_LD)
 AC_SUBST(GNU_CC)
@@ -2099,16 +2099,23 @@ case "$target" in
             else
                 AC_MSG_ERROR([Cannot find $LIBIDL_PREFIX/lib/libIDL-0.6.lib or $LIBIDL_PREFIX/lib/libIDL-0.6_s.lib])
             fi
         fi
         LIBIDL_LIBS="${LIBIDL_LIBS} ${GLIB_LIBS}"
         ;;
     esac 
 
+    AC_CHECK_HEADERS(mmintrin.h oleacc.idl)
+
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    AC_CHECK_HEADERS(atlbase.h wpcapi.h)
+    AC_LANG_RESTORE
+
     case "$target" in
     i*86-*)
     	AC_DEFINE(_X86_)
 	;;
     alpha-*)
     	AC_DEFINE(_ALPHA_)
 	;;
     mips-*)