Bill Allombert on Fri, 30 Jan 2004 14:05:55 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Preparing PARI 2.3 |
On Wed, Jan 28, 2004 at 02:06:35AM +0100, Bill Allombert wrote: > This one allow me to complete the list: > > --- Change the soname of libpari.so.2 to libpari-gmp.so.2 when build > with GMP support (as discussed previously). The following patch implement that. I need to make two disclaimers: 1°) this patch do not simply implement that, it also change the .so link of the developement version to be libpari.so, whereas it was libpari-2.2.so. This means you have to use -lpari to compile PARI programs, not -lpari-2.2. On the other hand, the soname and library name still cary -the -2.2 identifier. This means you can have all the possible shared library installed in the same installation prefix but only one development enviroment (include,libpari.so). I don't see that as bug, since it is the standard way to proceed. Having a versionned .so does not make sense without versionned headers files. The simplest way to implement versionned headers files (to put them in $prefix/include/pari-2.2/ is too cumbersome since it require to change each C file to say #include <pari-2.2/pari.h> instead of #include <pari/pari.h>. Versionned developement environments are usually implemented by versionning the installation prefix, like in /usr/lib/gcc-lib/<version>/{include,lib}. You can already use such a scheme with the --prefix Configure option. Note that the GMP version has a different set of header file, so you should use a different prefix for the GMP and non-GMP version. 2°) this patch change the meaning of the $libpari_base variable, and hardcode 'pari' at some place. Also it add code to Configure. There could be more elegant way to handle this. (this patch does not affect GP2C, for what it worth) Oh, and I apologize for breaking compatibilities with your custom Makefiles at this stage, but incompatibilities are the point of development releases :) Cheers, Bill
Index: Configure =================================================================== RCS file: /home/cvs/pari/Configure,v retrieving revision 1.130 diff -u -r1.130 Configure --- Configure 13 Dec 2003 13:55:24 -0000 1.130 +++ Configure 30 Jan 2004 10:49:54 -0000 @@ -86,6 +86,19 @@ echo ...none fi fi +############################################################################# +case $kernlvl1 in +gmp) libpari_base=pari-gmp;; +none) libpari_base=pari;; +esac + +if test `expr $VersionMinor % 2` = 1; then + pari_release_verbose="$pari_release (STABLE)" +else + pari_release_verbose="$pari_release (DEVELOPMENT VERSION)" + libpari_base=$libpari_base-$version +fi + ####################### CONFIGURE - MAKE #################################### . ./get_install # $_install_list . ./get_objdir # objdir, cdobjdir @@ -93,7 +106,7 @@ echo "Hi-Res Graphics: $which_graphic_lib" # For dynamic linking, before and after installing runpath="$libdir" -LDDYN="-L$libdir -l$libpari_base" +LDDYN="-L$libdir -lpari" # Which copy, SHELL ? case "$osname" in os2) ln_s=cp; make_sh=sh;; Index: config/GEN_Make.SH =================================================================== RCS file: /home/cvs/pari/config/GEN_Make.SH,v retrieving revision 1.11 diff -u -r1.11 GEN_Make.SH --- config/GEN_Make.SH 11 Mar 2003 23:05:31 -0000 1.11 +++ config/GEN_Make.SH 30 Jan 2004 10:49:54 -0000 @@ -66,7 +66,7 @@ RUNPTH = $RUNPTH DLCFLAGS = $DLCFLAGS -LIBS = $LIBS -L$libdir -l$libpari_base +LIBS = $LIBS -L$libdir -lpari RM = rm -f Index: config/Makefile.SH =================================================================== RCS file: /home/cvs/pari/config/Makefile.SH,v retrieving revision 1.116 diff -u -r1.116 Makefile.SH --- config/Makefile.SH 8 Jan 2004 18:02:10 -0000 1.116 +++ config/Makefile.SH 30 Jan 2004 10:49:58 -0000 @@ -225,12 +225,13 @@ LIB_PREFIX = $lib_prefix DLLIB_PREFIX = $dllib_prefix LIBPARI_BASE = $libpari_base -LIBPARI = \$(LIB_PREFIX)\$(LIBPARI_BASE) -DLLIBPARI = \$(DLLIB_PREFIX)\$(LIBPARI_BASE) +LIBPARI = \$(LIB_PREFIX)pari +DLLIBPARI = \$(DLLIB_PREFIX)pari LIBPARI_STA = \$(LIBPARI)\$(_A) LIBPARI_SO = \$(DLLIBPARI).$DLSUFFIX -LIBPARI_DYN = \$(LIBPARI_SO)$sodest -LIBPARI_SONAME= \$(LIBPARI_SO)$soname +SOLIBPARI = \$(DLLIB_PREFIX)\$(LIBPARI_BASE).$DLSUFFIX +LIBPARI_DYN = \$(SOLIBPARI)$sodest +LIBPARI_SONAME= \$(SOLIBPARI)$soname EXPORT_FILE = $export_file EXPORT_CREATE = $export_create EXPORT_LIB = $export_lib Index: config/get_config_options =================================================================== RCS file: /home/cvs/pari/config/get_config_options,v retrieving revision 1.21 diff -u -r1.21 get_config_options --- config/get_config_options 8 Nov 2003 19:02:51 -0000 1.21 +++ config/get_config_options 30 Jan 2004 10:50:00 -0000 @@ -8,13 +8,7 @@ version=$VersionMajor.$VersionMinor pari_release="$version.$patch" -if test `expr $VersionMinor % 2` = 1; then - pari_release_verbose="$pari_release (STABLE)" - libpari_base=pari -else - pari_release_verbose="$pari_release (DEVELOPMENT VERSION)" - libpari_base=pari-$version -fi + echo "Configuring pari-$pari_release_verbose $patchlevel_verbose" # Processing Options