[Rcpp-commits] r330 - pkg

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jan 9 22:58:57 CET 2010


Author: edd
Date: 2010-01-09 22:58:56 +0100 (Sat, 09 Jan 2010)
New Revision: 330

Modified:
   pkg/configure
   pkg/configure.in
Log:
small reordering and cleanup -- we now use R to tell us about CXX which means we test the capabilities of the C++ compiler we end up using which seems sensible


Modified: pkg/configure
===================================================================
--- pkg/configure	2010-01-09 21:42:43 UTC (rev 329)
+++ pkg/configure	2010-01-09 21:58:56 UTC (rev 330)
@@ -1739,7 +1739,7 @@
 
 
 
-# We are using C++
+## We are using C++
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2391,7 +2391,106 @@
 
 
 
-# The grep/sed command could probably be rewritten in Rscript as well
+
+## Basic check for R itself
+
+# Extract the first word of "R", so it can be a program name with args.
+set dummy R; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_R+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$R"; then
+  ac_cv_prog_R="$R" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_R="yes"
+    $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
+
+fi
+fi
+R=$ac_cv_prog_R
+if test -n "$R"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $R" >&5
+$as_echo "$R" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+## look for Rscript, but use the one found via R_HOME to allow for multiple installations
+
+# Extract the first word of "Rscript", so it can be a program name with args.
+set dummy Rscript; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RSCRIPT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RSCRIPT"; then
+  ac_cv_prog_RSCRIPT="$RSCRIPT" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RSCRIPT="yes"
+    $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
+
+fi
+fi
+RSCRIPT=$ac_cv_prog_RSCRIPT
+if test -n "$RSCRIPT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSCRIPT" >&5
+$as_echo "$RSCRIPT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test x"${RSCRIPT}" == x"yes" ; then
+     hasRscript=true
+else
+    echo "
+  Your installation does not appear to have Rscript installed.
+
+  Please make sure that you have a working and complete R installation.
+"
+    exit 1
+fi
+
+## Next segment by Kurt
+: ${R_HOME=`R RHOME`}
+if test -z "${R_HOME}"; then
+   as_fn_error "Could not determine R_HOME." "$LINENO" 5
+fi
+CXX=`${R_HOME}/bin/R CMD config CXX`
+CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
+
+## The grep/sed command could probably be rewritten in Rscript as well
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2658,147 +2757,46 @@
 	     as_fn_error "Please use a different compiler." "$LINENO" 5
         ;;
         3.*|4.0.*|4.1.*)
-	     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Only g++ version 4.2 or greater have been used for recent Rcpp development." >&5
-$as_echo "$as_me: WARNING: Only g++ version 4.2 or greater have been used for recent Rcpp development." >&2;}
-	     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please report any errors you may see to the maintainers." >&5
-$as_echo "$as_me: WARNING: Please report any errors you may see to the maintainers." >&2;}
+	     { $as_echo "$as_me:${as_lineno-$LINENO}: Only g++ version 4.2 or greater have been used for recent Rcpp development." >&5
+$as_echo "$as_me: Only g++ version 4.2 or greater have been used for recent Rcpp development." >&6;}
+	     { $as_echo "$as_me:${as_lineno-$LINENO}: Please report any errors you may see to the maintainers." >&5
+$as_echo "$as_me: Please report any errors you may see to the maintainers." >&6;}
 	     has43=no
 	     has44=no
         ;;
         4.2.*)
-	     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: With g++ version 4.2 core functionality should be stable -- but no C++0x features though." >&5
-$as_echo "$as_me: WARNING: With g++ version 4.2 core functionality should be stable -- but no C++0x features though." >&2;}
+	     { $as_echo "$as_me:${as_lineno-$LINENO}: With g++ version 4.2 core functionality should be stable -- but no C++0x features though." >&5
+$as_echo "$as_me: With g++ version 4.2 core functionality should be stable -- but no C++0x features though." >&6;}
 	     has43=no
 	     has44=no
         ;;
         4.3.*)
-	     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: With g++ version 4.3 parts of the new Cxx0x standard are available." >&5
-$as_echo "$as_me: WARNING: With g++ version 4.3 parts of the new Cxx0x standard are available." >&2;}
+	     { $as_echo "$as_me:${as_lineno-$LINENO}: With g++ version 4.3 parts of the new Cxx0x standard are available." >&5
+$as_echo "$as_me: With g++ version 4.3 parts of the new Cxx0x standard are available." >&6;}
 	     has43=yes
 	     has44=no
         ;;
         4.*)
-	     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: With g++ version 4.4 or newer more parts of the new Cxx0x standard are available." >&5
-$as_echo "$as_me: WARNING: With g++ version 4.4 or newer more parts of the new Cxx0x standard are available." >&2;}
+	     { $as_echo "$as_me:${as_lineno-$LINENO}: With g++ version 4.4 or newer more parts of the new Cxx0x standard are available." >&5
+$as_echo "$as_me: With g++ version 4.4 or newer more parts of the new Cxx0x standard are available." >&6;}
 	     has43=yes
 	     has44=yes
         ;;
         *)
-	     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Hm, not sure what g++ version you have, so using minimal features and no C++0x." >&5
-$as_echo "$as_me: WARNING: Hm, not sure what g++ version you have, so using minimal features and no C++0x." >&2;}
+	     { $as_echo "$as_me:${as_lineno-$LINENO}: Hm, not sure what g++ version you have, so using minimal features and no C++0x." >&5
+$as_echo "$as_me: Hm, not sure what g++ version you have, so using minimal features and no C++0x." >&6;}
 	     has43=no
 	     has44=no
         ;;
     esac
 else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Hm, not sure what C++ compiler you have, so using minimal features and no C++0x." >&5
-$as_echo "$as_me: WARNING: Hm, not sure what C++ compiler you have, so using minimal features and no C++0x." >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Hm, not sure what C++ compiler you have, so using minimal features and no C++0x." >&5
+$as_echo "$as_me: Hm, not sure what C++ compiler you have, so using minimal features and no C++0x." >&6;}
     has43=no
     has44=no
 fi
 
 
-# Basic check for R itself
-
-# Extract the first word of "R", so it can be a program name with args.
-set dummy R; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_R+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$R"; then
-  ac_cv_prog_R="$R" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_R="yes"
-    $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
-
-fi
-fi
-R=$ac_cv_prog_R
-if test -n "$R"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $R" >&5
-$as_echo "$R" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-# Next segment by Kurt
-: ${R_HOME=`R RHOME`}
-if test -z "${R_HOME}"; then
-   as_fn_error "Could not determine R_HOME." "$LINENO" 5
-fi
-CXX=`${R_HOME}/bin/R CMD config CXX`
-CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
-
-
-## look for Rscript, but use the one found via R_HOME to allow for multiple installations
-
-# Extract the first word of "Rscript", so it can be a program name with args.
-set dummy Rscript; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RSCRIPT+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RSCRIPT"; then
-  ac_cv_prog_RSCRIPT="$RSCRIPT" # Let the user override the test.
-else
-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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RSCRIPT="yes"
-    $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
-
-fi
-fi
-RSCRIPT=$ac_cv_prog_RSCRIPT
-if test -n "$RSCRIPT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSCRIPT" >&5
-$as_echo "$RSCRIPT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x"${RSCRIPT}" == x"yes" ; then
-     hasRscript=true
-else
-    echo "
-  Your installation does not appear to have Rscript installed.
-
-  Please make sure that you have a working and complete R installation.
-"
-    exit 1
-fi
-
-
 ## now use the 'has43' flag to add -std=c++0x to PKG_CXXFLAGS
 if test x"${has43}" == x"yes" ; then
      cxx_flags="-std=c++0x"
@@ -3948,7 +3946,8 @@
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
-echo "Completed configuration and ready to build."
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Completed configuration and ready to build." >&5
+$as_echo "$as_me: Completed configuration and ready to build." >&6;}
 
 
 

Modified: pkg/configure.in
===================================================================
--- pkg/configure.in	2010-01-09 21:42:43 UTC (rev 329)
+++ pkg/configure.in	2010-01-09 21:58:56 UTC (rev 330)
@@ -24,17 +24,44 @@
 ## Kurt Hornik for the RQuantLib package and its compiler and library 
 ## detection
 
-# require at least autoconf 2.50
+## require at least autoconf 2.50
 AC_PREREQ(2.50)
 
-# Process this file with autoconf to produce a configure script.
+## Process this file with autoconf to produce a configure script.
 AC_INIT(Rcpp, 0.7.1.1)
 
-# We are using C++
+## We are using C++
 AC_LANG(C++)
 AC_REQUIRE_CPP
 
-# The grep/sed command could probably be rewritten in Rscript as well
+
+## Basic check for R itself
+AC_DEFUN(AC_PROG_R, [AC_CHECK_PROG(R,R,yes)])
+AC_PROG_R
+
+## look for Rscript, but use the one found via R_HOME to allow for multiple installations
+AC_DEFUN(AC_PROG_RSCRIPT, [AC_CHECK_PROG(RSCRIPT,Rscript,yes)])
+AC_PROG_RSCRIPT
+if test x"${RSCRIPT}" == x"yes" ; then
+     hasRscript=true
+else
+    echo "
+  Your installation does not appear to have Rscript installed.
+
+  Please make sure that you have a working and complete R installation.
+"
+    exit 1
+fi
+
+## Next segment by Kurt
+: ${R_HOME=`R RHOME`}
+if test -z "${R_HOME}"; then
+   AC_MSG_ERROR([Could not determine R_HOME.])		
+fi
+CXX=`${R_HOME}/bin/R CMD config CXX`
+CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
+
+## The grep/sed command could probably be rewritten in Rscript as well
 AC_PROG_CXX
 if test "${GXX}" = yes; then
     gxx_version=`${CXX} -v 2>&1 | grep "^.*g.. version" | sed -e 's/^.*g.. version *//'`
@@ -44,68 +71,39 @@
 	     AC_MSG_ERROR([Please use a different compiler.])   
         ;;
         3.*|4.0.*|4.1.*)
-	     AC_MSG_WARN([Only g++ version 4.2 or greater have been used for recent Rcpp development.])
-	     AC_MSG_WARN([Please report any errors you may see to the maintainers.])   
+	     AC_MSG_NOTICE([Only g++ version 4.2 or greater have been used for recent Rcpp development.])
+	     AC_MSG_NOTICE([Please report any errors you may see to the maintainers.])   
 	     has43=no
 	     has44=no
         ;;
         4.2.*)
-	     AC_MSG_WARN([With g++ version 4.2 core functionality should be stable -- but no C++0x features though].)
+	     AC_MSG_NOTICE([With g++ version 4.2 core functionality should be stable -- but no C++0x features though].)
 	     has43=no
 	     has44=no
         ;;
         4.3.*)
-	     AC_MSG_WARN([With g++ version 4.3 parts of the new Cxx0x standard are available.])
+	     AC_MSG_NOTICE([With g++ version 4.3 parts of the new Cxx0x standard are available.])
 	     has43=yes
 	     has44=no
         ;;
         4.*)
-	     AC_MSG_WARN([With g++ version 4.4 or newer more parts of the new Cxx0x standard are available.])
+	     AC_MSG_NOTICE([With g++ version 4.4 or newer more parts of the new Cxx0x standard are available.])
 	     has43=yes
 	     has44=yes
         ;;
         *)
-	     AC_MSG_WARN([Hm, not sure what g++ version you have, so using minimal features and no C++0x.])
+	     AC_MSG_NOTICE([Hm, not sure what g++ version you have, so using minimal features and no C++0x.])
 	     has43=no
 	     has44=no
         ;;
     esac
 else
-    AC_MSG_WARN([Hm, not sure what C++ compiler you have, so using minimal features and no C++0x.])
+    AC_MSG_NOTICE([Hm, not sure what C++ compiler you have, so using minimal features and no C++0x.])
     has43=no
     has44=no
 fi
 
 
-# Basic check for R itself
-AC_DEFUN(AC_PROG_R, [AC_CHECK_PROG(R,R,yes)])
-AC_PROG_R
-
-
-# Next segment by Kurt
-: ${R_HOME=`R RHOME`}
-if test -z "${R_HOME}"; then
-   AC_MSG_ERROR([Could not determine R_HOME.])		
-fi
-CXX=`${R_HOME}/bin/R CMD config CXX`
-CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
-
-
-## look for Rscript, but use the one found via R_HOME to allow for multiple installations
-AC_DEFUN(AC_PROG_RSCRIPT, [AC_CHECK_PROG(RSCRIPT,Rscript,yes)])
-AC_PROG_RSCRIPT
-if test x"${RSCRIPT}" == x"yes" ; then
-     hasRscript=true
-else
-    echo "
-  Your installation does not appear to have Rscript installed.
-
-  Please make sure that you have a working and complete R installation.
-"
-    exit 1
-fi
-
-
 ## now use the 'has43' flag to add -std=c++0x to PKG_CXXFLAGS
 if test x"${has43}" == x"yes" ; then
      cxx_flags="-std=c++0x"
@@ -116,7 +114,7 @@
 ## now use cxx_flags
 AC_SUBST([CXXFLAGS],["${CXXFLAGS} $cxx_flags"])
 AC_OUTPUT(src/Makevars)
-echo "Completed configuration and ready to build."
+AC_MSG_NOTICE([Completed configuration and ready to build.])
 
 
 



More information about the Rcpp-commits mailing list