comparison configure.in @ 81232:afb1869f8a12

(NON_GNU_CPP): On Solaris, set using a proper check for a Sun C compiler.
author Glenn Morris <rgm@gnu.org>
date Thu, 07 Jun 2007 07:54:19 +0000
parents da070d0314e4
children 425fdad2ce24
comparison
equal deleted inserted replaced
81231:404952adbf23 81232:afb1869f8a12
1030 NON_GNU_CPP=/usr/ccs/lib/cpp 1030 NON_GNU_CPP=/usr/ccs/lib/cpp
1031 RANLIB="ar -ts" 1031 RANLIB="ar -ts"
1032 ;; 1032 ;;
1033 *-sunos5* | *-solaris* ) 1033 *-sunos5* | *-solaris* )
1034 opsys=sol2-6 1034 opsys=sol2-6
1035 ## FIXME: make this into a proper fix that checks the compiler type, 1035 emacs_check_sunpro_c=yes
1036 ## rather than relying on path. Or is /usr/ccs/lib/cpp a bad default now? 1036 NON_GNU_CPP=/usr/ccs/lib/cpp
1037 if [ "x$CC" = x/opt/SUNWspro/bin/cc ]; then
1038 ## -Xs prevents spurious whitespace.
1039 NON_GNU_CPP="/opt/SUNWspro/bin/cc -E -Xs"
1040 else
1041 NON_GNU_CPP=/usr/ccs/lib/cpp
1042 fi
1043 ;; 1037 ;;
1044 * ) opsys=bsd4-2 ;; 1038 * ) opsys=bsd4-2 ;;
1045 esac 1039 esac
1046 ## Watch out for a compiler that we know will not work. 1040 ## Watch out for a compiler that we know will not work.
1047 case "${canonical}" in 1041 case "${canonical}" in
1271 AC_PROG_CC 1265 AC_PROG_CC
1272 1266
1273 # On Suns, sometimes $CPP names a directory. 1267 # On Suns, sometimes $CPP names a directory.
1274 if test -n "$CPP" && test -d "$CPP"; then 1268 if test -n "$CPP" && test -d "$CPP"; then
1275 CPP= 1269 CPP=
1270 fi
1271
1272 ## If not using gcc, and on Solaris, and no CPP specified, see if
1273 ## using a Sun compiler, which needs -Xs to prevent whitespace.
1274 if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
1275 test x"$CPP" = x; then
1276 AC_MSG_CHECKING([whether we are using a Sun C compiler])
1277 AC_CACHE_VAL(emacs_cv_sunpro_c,
1278 [AC_TRY_LINK([],
1279 [#ifndef __SUNPRO_C
1280 fail;
1281 #endif
1282 ], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)])
1283 AC_MSG_RESULT($emacs_cv_sunpro_c)
1284
1285 if test x"$emacs_cv_sunpro_c" = xyes; then
1286 NON_GNU_CPP="$CC -E -Xs"
1287 fi
1276 fi 1288 fi
1277 1289
1278 #### Some systems specify a CPP to use unless we are using GCC. 1290 #### Some systems specify a CPP to use unless we are using GCC.
1279 #### Now that we know whether we are using GCC, we can decide whether 1291 #### Now that we know whether we are using GCC, we can decide whether
1280 #### to use that one. 1292 #### to use that one.