summaryrefslogtreecommitdiff
path: root/build-0.3/cxx/intel/configure
diff options
context:
space:
mode:
Diffstat (limited to 'build-0.3/cxx/intel/configure')
-rwxr-xr-xbuild-0.3/cxx/intel/configure24
1 files changed, 21 insertions, 3 deletions
diff --git a/build-0.3/cxx/intel/configure b/build-0.3/cxx/intel/configure
index ef250cf..7f79dd8 100755
--- a/build-0.3/cxx/intel/configure
+++ b/build-0.3/cxx/intel/configure
@@ -1,12 +1,13 @@
#! /usr/bin/env bash
# file : build/cxx/intel/configure
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
# $1 out file
# $2 optimize (y/n)
+# $3 cxx_extra_options
+# $4 cxx_ld_extra_options
#
# bld_root - build root
# project_name - project name
@@ -27,7 +28,24 @@ $echo "'/opt/intel_cc_80/bin/icpc'."
$echo
cxx_intel=`read_path --command icpc`
-cxx_intel_libraries=`$cxx_intel -print-search-dirs | sed -e 's/libraries: =//p' -e d`
+
+# Determine the C++ standard. Intel C++ on GNU/Linux appears to use the
+# same option and values as GCC.
+#
+cxx_intel_standard=`echo "$3" | sed -e 's/.*-std=\([^ ]*\).*/\1/' -e t -e d`
+
+if [ -z "$cxx_intel_standard" ]; then
+ cxx_intel_standard="gnu++98"
+elif [ "$cxx_intel_standard" = "c++0x" ]; then
+ cxx_intel_standard="c++11"
+elif [ "$cxx_intel_standard" = "gnu++0x" ]; then
+ cxx_intel_standard="gnu++11"
+fi
+
+# Pass cxx_extra_options and cxx_ld_extra_options since those
+# can affect the search paths (e.g., -m32).
+#
+cxx_intel_libraries=`$cxx_intel $3 $4 -print-search-dirs | sed -e 's/libraries: =//p' -e d`
# Intel optimizes by default.
#