Permalink
Browse files

fixes for OSX Mavericks

  • Loading branch information...
1 parent bb42132 commit b30abe93448a7ee7379f266434c170cbbeb60a42 @atzedijkstra atzedijkstra committed Feb 17, 2014
View
@@ -677,7 +677,6 @@ llvmOpt
LLVM_AS_CMD
llvmAs
CPP_CMD
-cppCmd
CC_STD_FLAG
OBJEXT
EXEEXT
@@ -725,6 +724,7 @@ AR_CMD
arCmd
RANLIB_CMD
ranlibCmd
+cppCmd
ENABLE_TAUPHI
ENABLE_CORESYSF
ENABLE_TYCORE
@@ -812,6 +812,7 @@ enable_clr
enable_tycore
enable_coresysf
enable_tauphi
+with_cpp
with_build_suffix
with_gcc_ehc_options
with_cpp_ehc_options
@@ -828,7 +829,6 @@ with_haddock
with_uuagc
with_shuffle
with_gcc
-with_cpp
with_llvm_as
with_opt
with_llc
@@ -1470,14 +1470,17 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-cpp=<cpp preprocessor>
+ Use a command different from 'cpp' to compile with
+ CPP.
--with-build-suffix=<suffix for build locations>
Suffix for build locations and library names of
globally visible cabal managed libraries.
--with-gcc-ehc-options=<gcc compiler options for compiling runtime and ehc's gcc invocation>
Additional options to pass to GCC when compiling
with EHC.
--with-cpp-ehc-options=<cpp preprocessor options for ehc's cpp invocation>
- Additional options to pass to GCC when compiling
+ Additional options to pass to CPP when compiling
with EHC.
--with-shuffle-ehc-options=<shuffle options for compiling ehc>
Additional options to pass to SHUFFLE when compiling
@@ -1517,9 +1520,6 @@ Optional Packages:
--with-gcc=<gcc compiler>
Use a command different from 'gcc' to compile with
GCC.
- --with-cpp=<cpp preprocessor>
- Use a command different from 'cpp' to compile with
- CPP.
--with-llvm-as=<LLVM Assembler>
Path to the LLVM Assembler
--with-llvm-opt=<LLVM bitcode optimizer>
@@ -3146,6 +3146,79 @@ fi
ENABLE_TAUPHI=$enableTauPhi
+### cpp
+
+# Check whether --with-cpp was given.
+if test "${with_cpp+set}" = set; then :
+ withval=$with_cpp; cppCmd="$withval"
+else
+
+ if test "$CPP" = ""; then
+ # Extract the first word of "cpp", so it can be a program name with args.
+set dummy cpp; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_cppCmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $cppCmd in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_cppCmd="$cppCmd" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_cppCmd="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+cppCmd=$ac_cv_path_cppCmd
+if test -n "$cppCmd"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cppCmd" >&5
+$as_echo "$cppCmd" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ cppCmd=$CPP
+ fi
+
+
+fi
+
+if test "$cppCmd" != "no" -a -x "$cppCmd"; then
+ cppExists="yes"
+ cppVersion=`$cppCmd --version`
+else
+ cppCmd=""
+ cppExists="no"
+fi
+
+### cpp clang specific check, turning of some options
+cppVersionHasClang=`echo ${cppVersion} | grep clang`
+if test "${cppVersionHasClang}" = ""; then
+ cppClangEhcOptions=""
+ gccClangEhcOptions=""
+else
+ cppClangEhcOptions="-Wno-invalid-pp-token"
+ gccClangEhcOptions="-Wno-array-bounds"
+fi
+
### ranlib
# Extract the first word of "ranlib", so it can be a program name with args.
@@ -3419,9 +3492,11 @@ fi
# additional platform dependend options for gcc when compiling C from within ehc
case $HostPlatform in
i*86-pc-linux-gnu )
- #gccEhcOptions="$gccEhcOptions -D__USE_BSD -D__USE_POSIX"
+ #gccEhcOptions="${gccClangEhcOptions} $gccEhcOptions -D__USE_BSD -D__USE_POSIX"
+ gccEhcOptions="${gccClangEhcOptions} $gccEhcOptions"
;;
*)
+ gccEhcOptions="${gccClangEhcOptions} $gccEhcOptions"
;;
esac
@@ -3439,14 +3514,15 @@ fi
# additional platform dependend options for cpp when compiling C from within ehc
case $HostPlatform in
i*86-pc-linux-gnu )
- cppEhcOptions="$cppEhcOptions -D__STDC__"
+ cppEhcOptions="${cppClangEhcOptions} $cppEhcOptions -D__STDC__"
#cppEhcOptions="$cppEhcOptions -D__USE_BSD -D__USE_POSIX -D__STDC__"
;;
x86_64-*-linux-gnu )
- cppEhcOptions="$cppEhcOptions -D__STDC__"
+ cppEhcOptions="${cppClangEhcOptions} $cppEhcOptions -D__STDC__"
#cppEhcOptions="$cppEhcOptions -D__USE_BSD -D__USE_POSIX -D__STDC__"
;;
*)
+ cppEhcOptions="${cppClangEhcOptions}"
;;
esac
@@ -4911,69 +4987,6 @@ esac
CC_STD_FLAG=$cc_std_flag
-# cpp
-
-# Check whether --with-cpp was given.
-if test "${with_cpp+set}" = set; then :
- withval=$with_cpp; cppCmd="$withval"
-else
-
- if test "$CPP" = ""; then
- # Extract the first word of "cpp", so it can be a program name with args.
-set dummy cpp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_cppCmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $cppCmd in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_cppCmd="$cppCmd" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_cppCmd="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-cppCmd=$ac_cv_path_cppCmd
-if test -n "$cppCmd"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cppCmd" >&5
-$as_echo "$cppCmd" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- else
- cppCmd=$CPP
- fi
-
-
-fi
-
-if test "$cppCmd" != "no" -a -x "$cppCmd"; then
- cppExists="yes"
- cppVersion=`$cppCmd --version`
-else
- cppCmd=""
- cppExists="no"
-fi
-
# Now we have to deal with weird cygwin behaviour which allows /usr/bin to be used
# whereas in reality it is mapped onto /bin. Direct acccess to /usr/bin with a c:/cygwin prefix therefore does not work
# and has to be stripped of the /usr part.
@@ -10265,11 +10278,20 @@ echo " gcc is available? : $gccExists"
if test "x$gccExists" = "xyes" ;then
echo " version : $gccVersion"
echo " command for gcc : $gccCmd"
-echo " command for cpp : $cppCmd"
+echo " uhc options to gcc : $gccEhcOptions"
else
echo " **** ERROR **** : gcc must be installed, ask your OS guru"
fi
+echo " cpp is available? : $cppExists"
+if test "x$cppExists" = "xyes" ;then
+echo " version : `echo $cppVersion`"
+echo " command for cpp : $cppCmd"
+echo " uhc options to cpp : $cppEhcOptions"
+else
+echo " **** ERROR **** : cpp must be installed, ask your OS guru"
+fi
+
if test x$enableJava = xyes
then
echo " javac is available? : $javacExists"
View
@@ -177,6 +177,36 @@ AC_SUBST(ENABLE_CORESYSF,$enableCoreSysF)
AC_ARG_ENABLE(tauphi, AS_HELP_STRING([--enable-tauphi],[include TauPhi language extension and analyses]), [enableTauPhi=yes], [enableTauPhi=no])
AC_SUBST(ENABLE_TAUPHI,$enableTauPhi)
+### cpp
+AC_ARG_WITH(cpp,
+[AS_HELP_STRING([--with-cpp=<cpp preprocessor>],[Use a command different from 'cpp' to compile with CPP.])],
+[ cppCmd="$withval" ],
+[
+ if test "$CPP" = ""; then
+ AC_PATH_PROG(cppCmd,cpp)
+ else
+ cppCmd=$CPP
+ fi
+]
+)
+if test "$cppCmd" != "no" -a -x "$cppCmd"; then
+ cppExists="yes"
+ cppVersion=`$cppCmd --version`
+else
+ cppCmd=""
+ cppExists="no"
+fi
+
+### cpp clang specific check, turning of some options
+cppVersionHasClang=`echo ${cppVersion} | grep clang`
+if test "${cppVersionHasClang}" = ""; then
+ cppClangEhcOptions=""
+ gccClangEhcOptions=""
+else
+ cppClangEhcOptions="-Wno-invalid-pp-token"
+ gccClangEhcOptions="-Wno-array-bounds"
+fi
+
### ranlib
REQUIRED_PROG_FOR_EH(ranlibCmd,ranlib)
# See remarks about cpp
@@ -244,30 +274,33 @@ AC_ARG_WITH(gcc-ehc-options,
# additional platform dependend options for gcc when compiling C from within ehc
case $HostPlatform in
i*86-pc-linux-gnu )
- #gccEhcOptions="$gccEhcOptions -D__USE_BSD -D__USE_POSIX"
+ #gccEhcOptions="${gccClangEhcOptions} $gccEhcOptions -D__USE_BSD -D__USE_POSIX"
+ gccEhcOptions="${gccClangEhcOptions} $gccEhcOptions"
;;
*)
+ gccEhcOptions="${gccClangEhcOptions} $gccEhcOptions"
;;
esac
AC_SUBST(GCC_EHC_OPTIONS, "$gccEhcOptions")
### 'with' option for cpp options
AC_ARG_WITH(cpp-ehc-options,
-[AS_HELP_STRING([--with-cpp-ehc-options=<cpp preprocessor options for ehc's cpp invocation>],[Additional options to pass to GCC when compiling with EHC.])],
+[AS_HELP_STRING([--with-cpp-ehc-options=<cpp preprocessor options for ehc's cpp invocation>],[Additional options to pass to CPP when compiling with EHC.])],
[ cppEhcOptions="$withval" ],)
# additional platform dependend options for cpp when compiling C from within ehc
case $HostPlatform in
i*86-pc-linux-gnu )
- cppEhcOptions="$cppEhcOptions -D__STDC__"
+ cppEhcOptions="${cppClangEhcOptions} $cppEhcOptions -D__STDC__"
#cppEhcOptions="$cppEhcOptions -D__USE_BSD -D__USE_POSIX -D__STDC__"
;;
x86_64-*-linux-gnu )
- cppEhcOptions="$cppEhcOptions -D__STDC__"
+ cppEhcOptions="${cppClangEhcOptions} $cppEhcOptions -D__STDC__"
#cppEhcOptions="$cppEhcOptions -D__USE_BSD -D__USE_POSIX -D__STDC__"
;;
*)
+ cppEhcOptions="${cppClangEhcOptions}"
;;
esac
@@ -574,26 +607,6 @@ case $cc_version in
esac
AC_SUBST(CC_STD_FLAG,$cc_std_flag)
-# cpp
-AC_ARG_WITH(cpp,
-[AS_HELP_STRING([--with-cpp=<cpp preprocessor>],[Use a command different from 'cpp' to compile with CPP.])],
-[ cppCmd="$withval" ],
-[
- if test "$CPP" = ""; then
- AC_PATH_PROG(cppCmd,cpp)
- else
- cppCmd=$CPP
- fi
-]
-)
-if test "$cppCmd" != "no" -a -x "$cppCmd"; then
- cppExists="yes"
- cppVersion=`$cppCmd --version`
-else
- cppCmd=""
- cppExists="no"
-fi
-
# Now we have to deal with weird cygwin behaviour which allows /usr/bin to be used
# whereas in reality it is mapped onto /bin. Direct acccess to /usr/bin with a c:/cygwin prefix therefore does not work
# and has to be stripped of the /usr part.
@@ -1214,11 +1227,20 @@ echo " gcc is available? : $gccExists"
if test "x$gccExists" = "xyes" ;then
echo " version : $gccVersion"
echo " command for gcc : $gccCmd"
-echo " command for cpp : $cppCmd"
+echo " uhc options to gcc : $gccEhcOptions"
else
echo " **** ERROR **** : gcc must be installed, ask your OS guru"
fi
+echo " cpp is available? : $cppExists"
+if test "x$cppExists" = "xyes" ;then
+echo " version : `echo $cppVersion`"
+echo " command for cpp : $cppCmd"
+echo " uhc options to cpp : $cppEhcOptions"
+else
+echo " **** ERROR **** : cpp must be installed, ask your OS guru"
+fi
+
if test x$enableJava = xyes
then
echo " javac is available? : $javacExists"
Oops, something went wrong.

0 comments on commit b30abe9

Please sign in to comment.