[Rd] Problems with autoconf example from r-ext.

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Oct 5 15:39:47 CEST 2005


The current R-exts.texi has

AC_INIT([RODBC], 1.1.4) dnl package name, version

and that is crucially different from your example.  Autoconf 2.59 has a 
barely documented back-compatibility mode than is invoked for AC_INIT with 
just one argument.


since in has a pare

On Wed, 5 Oct 2005, nwew wrote:

> Dear R-developers,
>
> I am trying to reproduce the autoconf.ac example from R-ext and fail.
>
> My autoconf file looks like this
>
> [autoconf.ac]
> # original by Friedrich Leisch, much changed by BDR
>
> AC_INIT([SBMLodeSolveR])
>
> dnl Select an optional include path, from a configure option
> dnl or from an environment variable.
> AC_ARG_WITH([sbmlode-include],
>            AC_HELP_STRING([--with-sbmlode-include=INCLUDE_PATH],
>                           [the location of SBMLODE header files]),
>            [sbmlode_include_path=$withval])
> if test [ -n "$sbmlode_include_path" ] ; then
>   AC_SUBST([CPPFLAGS],["-I${sbmlode_include_path} ${CPPFLAGS}"])
> else
>  if test [ -n "${SBMLODE_INCLUDE}" ] ; then
>     AC_SUBST([CPPFLAGS],["-I${SBMLODE_INCLUDE} ${CPPFLAGS}"])
>  fi
> fi
>
>
> dnl ditto for a library path
> AC_ARG_WITH([sbmlode-lib],AC_HELP_STRING([--with-sbmlode-lib=LIB_PATH],[the
> location of libsbmlode libraries]),[sbmlode_lib_path=$withval])
>
>          if test [ -n "$sbmlode_lib_path" ] ; then
>             AC_SUBST([LIBS],[" -L${sbmlode_lib_path} ${LIBS}"])
>          else
>            if test [ -n "${SBMLODE_LIBS}" ] ; then
>               AC_SUBST([LIBS],["-I${SBMLODE_LIBS} ${LIBS}"])
>            fi
>          fi
>
> dnl Now find the compiler and compiler flags to use
>          : ${R_HOME=`R RHOME`}
>          if test -z "${R_HOME}"; then
>            echo "could not determine R_HOME"
>            exit 1
>          fi
>          CC=`"${R_HOME}/bin/R" CMD config CC`
>          CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
>
>
> dnl substitute CPPFLAGS and LIBS
>          AC_SUBST(CPPFLAGS)
>          AC_SUBST(LIBS)
> dnl and do subsitution in the src/Makevars.in
>          AC_OUTPUT(src/Makevars)
>
> [end autoconf.ac]
>
> I rund autoconf..
>
> [Makevars.in]
> PKG_CFLAGS=@CPPFLAGS@
> PKG_LIBS=@LIBS@
> [end-Makevars.in]
>
> I rund R CMD with
>
> R CMD INSTALL
> --configure-args='--with-sbmlode-lib=/data/opt/sbmlodesolve/include \
> --with-sbmlode-include=/data/opt/sbmlodesolve/lib' \
> SBMLodeSolveR
>
>
> What I am getting is a
>
> [Makvars]
> PKG_CFLAGS=
> PKG_LIBS= -L/data/opt/sbmlodesolve/include
> [end-Makevars]
>
>
> and the following warnings
>
> [warnings]
> * Installing *source* package 'SBMLodeSolveR' ...
> configure: WARNING: you should use --build, --host, --target
> configure: WARNING: invalid host type: /data/opt/sbmlodesolve/lib
> configure: creating ./config.status
> config.status: creating src/Makevars
> *
> [end-warnings]
>
> Any suggestions?
>
> Eryk
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list