[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use of mkoctfile with autoconf/automake
From: |
Eric Chassande-Mottin |
Subject: |
Re: use of mkoctfile with autoconf/automake |
Date: |
Fri, 2 Mar 2007 12:36:52 +0100 |
hi,
Why not just use mkoctfile as a compiler? It can compile only (use -c
to create only object files) and link objects into a shared/dynamic
library (.oct file).
this is what i try to do in the example attached here.
I substitute the CXX by mkoctfile in configure.ac :
[...]
dnl set C++ compiler to mkoctfile
CXX=$MKOCTFILE
AC_SUBST(CXX)
[...]
i run then into troubles because mkoctfile is not entirely compatible with
the g++ options set by autoconf/automake:
if mkoctfile-2.9.9 -DPACKAGE_NAME=\"foo\" -DPACKAGE_TARNAME=\"foo\"
-DPACKAGE_VERSION=\"0.0\" -DPACKAGE_STRING=\"foo\ 0.0\"
-DPACKAGE_BUGREPORT=\"foo\" -DPACKAGE=\"foo\" -DVERSION=\"0.0\" -I.
-I. -g -O2 -MT foo.o -MD -MP -MF ".deps/foo.Tpo" -c -o foo.o
foo.cc; \
then mv -f ".deps/foo.Tpo" ".deps/foo.Po"; else rm -f
".deps/foo.Tpo"; exit 1; fi
mkoctfile: unrecognized argument -O2
the option -O2 would be simple to remove here, but I'm not sure for the rest.
any solution here?
The configuration scripts in the packages themselves are perhaps a bit
more interesting as they look for features, like the presence of pcre in
main/strings..
in configure.base of main/strings, the compiler options are set the same way
it is in the configure.base of topdir as far as I understand.
concerning prce, i presume you are referring to this section?
301 AC_SUBST(HAVE_PCRE)
[...]
310 if test $HAVE_PCRE = yes ; then
311 OF_CHECK_LIB(pcre, pcre_compile, HAVE_PCRE=yes, HAVE_PCRE=no)
[...]
this doesn't change the way you compile DLDs, right?
eric.
foo.tgz
Description: GNU Zip compressed data