[Genabel-commits] r1688 - in pkg/ProbABEL: . doc
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Apr 11 11:26:28 CEST 2014
Author: lckarssen
Date: 2014-04-11 11:26:28 +0200 (Fri, 11 Apr 2014)
New Revision: 1688
Modified:
pkg/ProbABEL/configure.ac
pkg/ProbABEL/doc/INSTALL
Log:
Added the --enable-dev-options option to ProbABEL's autoconf. This sets a few compiler flags specifically for development.
Also updated the INSTALL instructions accordingly. INSTALL contains a few other small updates as well.
Modified: pkg/ProbABEL/configure.ac
===================================================================
--- pkg/ProbABEL/configure.ac 2014-04-08 07:31:04 UTC (rev 1687)
+++ pkg/ProbABEL/configure.ac 2014-04-11 09:26:28 UTC (rev 1688)
@@ -19,20 +19,45 @@
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
-if test -z "$CXXFLAGS"; then
- # User did not set CXXFLAGS, so we can put in our own defaults
- CXXFLAGS="-g -O2 -DNDEBUG -Wextra"
+
+
+# Add an option to enable some default compiler options used during
+# development
+AC_ARG_ENABLE([dev-options],
+ [AS_HELP_STRING([--enable-dev-options], [enable compile options
+ for developers])],
+ [devoptions=yes],
+ [devoptions=no])
+
+if test "x$devoptions" = "xyes"; then
+ AC_MSG_NOTICE([Building with developer options enabled])
+ if test -z "$CXXFLAGS"; then
+ # User did not set CXXFLAGS, so we can put in our own defaults
+ CXXFLAGS="-O2"
+ fi
+ if test -z "$CPPFLAGS"; then
+ # User did not set CPPFLAGS, so we can put in our own defaults
+ CPPFLAGS="-Wall"
+ fi
+ CXXFLAGS+=" -g -Wextra"
fi
-if test -z "$CPPFLAGS"; then
- # User did not set CPPFLAGS, so we can put in our own defaults
- CPPFLAGS="-Wall"
+
+if test "x$devoptions" = "xno"; then
+ if test -z "$CXXFLAGS"; then
+ # User did not set CXXFLAGS, so we can put in our own defaults
+ CXXFLAGS="-O2 -DNDEBUG"
+ fi
+ if test -z "$CPPFLAGS"; then
+ # User did not set CPPFLAGS, so we can put in our own defaults
+ CPPFLAGS+="-Wall"
+ fi
fi
+
# If CXXFLAGS/CPPFLAGS are already set AC_PROG_CXX will not overwrite them
# with its own defaults
AC_PROG_CXX
-
-#Tell compiler to build not R version of filevector
+# Tell the compiler to build not R version of filevector
CXXFLAGS+=" -D_NOT_R_FILEVECTOR"
Modified: pkg/ProbABEL/doc/INSTALL
===================================================================
--- pkg/ProbABEL/doc/INSTALL 2014-04-08 07:31:04 UTC (rev 1687)
+++ pkg/ProbABEL/doc/INSTALL 2014-04-11 09:26:28 UTC (rev 1688)
@@ -22,8 +22,10 @@
If ./configure cannot find the Eigen library it will say so. To
disable the use of Eigen (even if the library is present) use:
./configure --without-eigen
+ Note that we do not recommend building ProbABEL without EIGEN as
+ the non-EIGEN code is tested less well and we are preparing to
+ phase out the non-EIGEN code.
-
* Compiling for Linux
If you downloaded the source from SVN (this is not necessary when
installing from the distributed .tar.gz file), run:
@@ -49,7 +51,7 @@
probabel_config.cfg.example. For probabel to work please rename
this file to probabel_config.cfg.
- To see options, run
+ To see additional options, run
./configure --help
The most notable option is
@@ -64,6 +66,16 @@
* Options for developers
+ Some default development compiler flags can be enabled by running
+ configure like this:
+./configure --enable-dev-options
+ The actual development values of CXXFLAGS and CPPFLAGS can be seen in
+ configure.ac or by adding --disable-silent-rules to ./configure. If
+ you want to specify your own flags run configure like this:
+CXXFLAGS="-O3 -Wextra" CPPFLAGS="-Wall" ./configure
+ or later, during the make process:
+make CXXFLAGS="-O3 -Wextra" CPPFLAGS="-Wall"
+
To generate a .tar.gz package for distribution run:
./configure
make dist
More information about the Genabel-commits
mailing list