Bill Allombert on Fri, 6 Dec 2002 15:25:54 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: --host in Configure |
Hello, I have made a new patch for Darwin that may work better than the previous one, added with the recent change in the CVS. Please try it. Also it would be nice to add support in gp2c, but I need more info about dlcompat. Cheers, Bill.
Index: Configure =================================================================== RCS file: /home/megrez/cvsroot/pari/Configure,v retrieving revision 1.95 diff -u -r1.95 Configure --- Configure 2002/10/22 22:07:51 1.95 +++ Configure 2002/12/06 14:19:57 @@ -521,9 +521,12 @@ case "$osname-$arch" in linux-i?86|cygwin*|os2-*) OPTFLAGS="$OPTFLAGS \ -malign-loops=2 -malign-jumps=2 -malign-functions=2";; + esac + case "$osname-$arch" in *-sparcv8*) cflags=-mv8;; + darwin-*) cflags=-fno-common;; + os2-*) cflags=-Zmt;; esac - if test "X$osname" = Xos2; then cflags=-Zmt; fi # omit-frame-pointer incompatible with -pg PRFFLAGS="-pg $OPTFLAGS" @@ -553,6 +556,7 @@ case "$osname" in nextstep) cflags="-traditional-cpp $cflags";; + darwin) cflags="-no-cpp-precomp $cflags";; esac case "$optimization" in @@ -634,6 +638,7 @@ linux-*|cygwin*|freebsd-*) LD=$CC; LDFLAGS="$cflags -Xlinker -export-dynamic" runpathprefix='-Xlinker -rpath -Xlinker ';; + darwin-*) LD=$CC; LDFLAGS="$cflags"; runpathprefix='';; #FIXME osf1-alpha) LD=$ld; LIBS="$LIBS -lots -lc"; runpathprefix='-rpath ' LDFLAGS='-std0 -call_shared /usr/lib/cmplrs/cc/crt0.o' @@ -667,7 +672,8 @@ echo "Executable linker is $LD $LDFLAGS" if test "$optimization" = profiling; then DLLD=; else - DLLD=${DLLD-ld} + DLLD=${DLLD-ld} + #FIXME: if CC=gcc we must link with gcc. DLSUFFIX=so # Which suffix for Dynamic Lib? # Some linkers (SunOS 4) need minor and major lib version numbers. @@ -692,6 +698,15 @@ # DLL names better be 8+3 libpari_base=`echo "$libpari_base" | sed 's/\./_/g'` ;; + darwin-*) + case $libpari_base in + pari) sodest=".$version.$patch.dylib";; # released versions + *) sodest=".$patch.0.0.dylib";; # unstable versions + esac ; + soname=".$soname_num.dylib"; + DLSUFFIX=''; + DLLD=$CC; + ;; *) DLLD=;; esac fi @@ -728,6 +743,11 @@ sunos-*) DLLDFLAGS="-assert nodefinitions" ;; solaris-*) DLLDFLAGS="-G -h \$(LIBPARI_SONAME)" ;; os2-*) ;; + darwin-*) + case $libpari_base in + pari) DLLDFLAGS="-dynamiclib -install_name \$(LIBDIR)/\$(LIBPARI_SONAME) -compatibility_version $version -current_version $pari_release";; + *) DLLDFLAGS="-dynamiclib -install_name \$(LIBDIR)/\$(LIBPARI_SONAME) -compatibility_version $pari_release -current_version $pari_release";; + esac ;; *) DLLD=;; esac fi