From: Andrew F. <af...@ph...> - 2006-06-14 17:08:48
|
Rainer Be aware that some of the 'internal' headers containing structure definitions will need to be put into the installation so that the dynamic compilation can reach it. On the build stuff Actually using AC_DEFINE and inserting hardcoded directories into config.h is against GNU coding standards (I assume there is some subtlty I can't think of!) according to the automake and autoconf pdfs So I plan to add =20 SUNDIALS_CFLAGS=3D"-I$with_sundials/include -DSUNDIALS_INCLUDE=3D$with_sundials/include -DSOSLIB_INCLUDE=3D$(includedir)" etc to config/sundials.m4 I'll try it tomorrow yours Andrew > -----Original Message----- > From: Rainer Machne [mailto:ra...@tb...]=20 > Sent: 14 June 2006 17:54 > To: Andrew Finney > Cc: SOSlib Development > Subject: Re: [SOSlib-devel] AIX built + dynamic compilation=20 > using gcc + help required[Scanned] >=20 > Andrew >=20 > great news! >=20 >=20 > > Is there a way to have something like: > > > > #define SUNDIALS_INSTALLATION "/usr/local/" > > #define SOSLIB_INSTALLATION "/usr/home/finney" >=20 > i guess, all we need to do is add some lines like >=20 > AC_DEFINE([USE_SUNDIALS_SUNDIALS], 1, > [Define to 1 to use the SUNDIALS Library]) >=20 > to the config/sundials.m4 file using the existing variables=20 > $SUNDIALS_CFLAGS, $SUNDIALS_LDFLAGS and $SUNDIALS_LIBS that=20 > we discussed earlier. Their value is printed as the final=20 > output of the configure process. They already contain the -L=20 > and -I switches. >=20 > The $prefix variable should contain the SOSlib installation path. >=20 > Maybe these variables could be used directly and you only=20 > need to add the following lines to config/sundials.m4 >=20 > AC_DEFINE([SUNDIALS_CFLAGS], $SUNDIALS_CFLAGS, > [SUNDIALS include directory]) > AC_DEFINE([SUNDIALS_LDFLAGS], $SUNDIALS_LDFLAGS, > [SUNDIALS lib directory]) > AC_DEFINE([SUNDIALS_LIBS], $SUNDIALS_LIBS, > [SUNDIALS lib switches]) >=20 > If we don't want the -L, -I, or the specific include and lib=20 > subdirectories we could use sed to remove these and define=20 > new variables. >=20 > For SOSlib directories, the line >=20 > AC_DEFINE([SOSLIB_INSTALLATION], $prefix, > [SSOSlib install directory]) >=20 > should be in the configure.in file. >=20 > I think that should do it, but i am also not an expert on this. >=20 > Xtof, what do you think? >=20 > Rainer >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 > On Wed, 14 Jun 2006, Andrew Finney wrote: >=20 > > Rainer > > > > I have managed get SOSlib to build on AIX and more=20 > importantly I have=20 > > managed to implement dynamic compilation using > > g++ and shared libraries the same way as I did for windows=20 > using tcc. > > The performance seems to be in the same ball park as the=20 > compiled code=20 > > was achieving on windows. I assumed that tcc is i386 specific. > > > > I'm effectively working on my own branch as I have not resolved the=20 > > `bug` in the most recent checked in source that's caused=20 > our model to=20 > > fail. So I'll probably just email you the relevant source files. =20 > > I'll try to document all the hacks required to get SOSlib=20 > to build on=20 > > AIX. > > > > One issue: > > > > I need to get hold of the include directory for sundials and SOSlib=20 > > for the dynamic compilation, that is in the code and not in=20 > a build file. > > All the files use temporary filenames > > > > Is there a way to have something like: > > > > #define SUNDIALS_INSTALLATION "/usr/local/" > > #define SOSLIB_INSTALLATION "/usr/home/finney" > > > > or > > > > #define SUNDIALS_INCLUDE "/usr/local/include" > > #define SOSLIB_INCLUDE "/usr/home/finney/include" > > > > inserted into config.h > > > > ? > > > > I assume this means some kind of configure.in hack I'm not=20 > exactly a=20 > > guru on that so guidance would be nice. > > > > Background: > > > > At the moment I have to hard code the include path which is=20 > not ideal. > > I tried using the same technique as windows: locate the sos=20 > > shared/dynamic library and then locate the include=20 > directory relative=20 > > to that. I ran into a showstopper on that on AIX : missing struct=20 > > definition in the include files. Anyway that's not the=20 > ideal approach=20 > > using the above would be better in an open-source build to install=20 > > environment. > > > > yours Andrew > > > > > > > > > > > > > > > > _______________________________________________ > > sbmlsolver-devel mailing list > > sbm...@li... > > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-devel > > >=20 |