#! /bin/sh # $Id: configure,v 1.173.2.2 2002/07/30 10:13:15 pjx Exp $ # This builds a configuration for CCP4 installation based on the value # of an argument which is meant to describe a supported system. On # the basis of it we have to establish the necessary directories and # build makefiles in the appropriate places from the skeletons in the # master source area. It's (obviously!) inspired by the GNU # configuration scripts. # The default values of the makefile variables (CC etc.) decided # according to the system type, can be overridden by values defined in # the environment or, in the case of the binary, library and master # source directories, by optional arguments. These variables are: # RANLIB, FC, XFFLAGS, CC, XCFLAGS, FOPTIM, COPTIM, LNS, M4, # SETFLAGS, MAKE, XLDFLAGS # See below for an explanation of unconventional ones. # We also check the supplied values of the environment variables which # must be defined to run ccp4 (for path names etc.) and create the # necessary directories if they don't already exist. The following # environment variables seem to be essential for *running* the code # (as deduced from calls to `getenv' and `UGTENV'): BINSORT_SCR, # CINCL, HOME, CCP4_OPEN, CLIBD, CCP4_SCR, CCP4_HELPDIR (used by # mosflm), PUBLIC_FONT84 # A design aim is to be able to support different configurations # painlessly by allowing building and subsequent installation to occur # independently and in random directories. The source is maintained # in a master directory, probably shared over NFS. For each system # one can start with a clean directory in which this script is run # with the system name and source directroy as arguments after setting # the appropriate environment variables e.g., # configure convex --src=/nfs/dlpx1/home/xtal/ccp4 --bin=/priv9/pxbin # This will make appropriate sub-directories in which everything can # be built (with a simple `make' at the top level) and from which the # programs can be run for test purposes. `make install' will copy the # results to the production directories for the appropriate system # once it checks out OK. # Fixme: check compiler and OS versions somehow against ones we're # sure about... (We should allow qualification of the system e.g., # sun-sunos4.1, and can arrange regexp matching in the cases.) Can # the OS be checked reliably? (uname? not on alliant -- uv there?) set -e 2>/dev/null # not sure whether this still gives an # error message with old sh... # Portability notes: the least common denominator so far is the convex # (os8.1), which has a lousy make, a (version 7-based?) sh without # functions or the ${foo:-bar} mechanism or a test with e.g., -x or # set -e. Use `test' rather than `[', by the way, since there are # supposed to be systems without the latter. Odd use of eval on # variables like $usage is instead of using functions like the # following (I guess these should just be inlined): ### ### CCP4 licensing and conditions. ### ### A complete new section for licensing ### Removing or attempting to bypass this section in the configure script ### is deemed as agreeing to the conditions outlined in $CCP4/license.txt agreed=no ans=n # changed this just in case the system does not have whoami. # Now defaults to $USER user=${USER} if test ! "$user" ; then user=`whoami` fi ### has someone else we (know about) agreed to the ccp4 conditions before? ### and if so make sure the the home dir has agreement file if test -f .agree2ccp4; then eval touch ${HOME}/.agree2ccp4; if test -w .agree2ccp4; then echo $user `date` >> .agree2ccp4; fi if test -w ${HOME}/.agree2ccp4; then date >> ${HOME}/.agree2ccp4; fi agreed=yes fi ### has the user agreed to the ccp4 condition's before? if test $agreed = "no"; then if test -f ${HOME}/.agree2ccp4; then eval touch .agree2ccp4 if test -w ${HOME}/.agree2ccp4; then date >> ${HOME}/.agree2ccp4; fi if test -w .agree2ccp4; then echo $user `date` >> .agree2ccp4; fi agreed=yes fi fi ### so if this site, as far as we know has never agreed to ccp4 ### conditions then they must! if test $agreed = "no"; then echo ; echo ; echo " For legal reasons we must draw your attention to the" echo " conditions of use and license agreement required to " echo " use the CCP4 package (If you agree to the conditions" echo " you should only be prompted for this information once)." echo ; echo ; echo -n " Please press return to continue:" read return; if test -r licence.txt; then echo ; echo ; echo "Please read the following"; echo ; more licence.txt ; echo ; echo ; echo "Do you agree to the above and agree (if this has not" ; echo "already been done) to return a completed and signed"; echo "copy of this document found in license.txt? " echo "(Please note that if a copy of the previous license has been"; echo "returned there is no need to send a copy of this new agreement)"; echo -n " y/n [n] ?:"; read ans ; if test $ans = "y"; then eval touch ${HOME}/.agree2ccp4; if test -w ${HOME}/.agree2ccp4; then date > ${HOME}/.agree2ccp4; else echo " No record of you agreeing to the CCP4 license coditions"; echo " has been kept in your home area."; fi echo $user `date` > .agree2ccp4; chmod ugo+rw .agree2ccp4 ; agreed=yes ; echo ; echo ; echo " Thank you. The CCP4 configure will now run as normal."; fi else echo " The file license.txt in the $CCP4 directory could not be found" echo " Please download or contact ccp4@ccp4.ac.uk" ; echo ; echo; exit 1 fi fi if test $agreed = "no"; then echo ; echo ; echo " You have indicated that you do not agree to the conditions"; echo " of use for the CCP4 package. Please delete all CCP4 software"; echo " from your system. If you have any further queries please refer "; echo " to the CCP4 web pages on http://www.dl.ac.uk/CCP/CCP4/ or contact" ; echo " ccp4@ccp4.ac.uk"; exit 1 fi ### End of licensing section. usage='echo "Usage: configure [--help] [--srcdir=DIR] [--bindir=DIR] [--libdir=DIR] [--onlylibs] [--tmpdir=DIR] [--with-f2c] [--with-shared-lib] [--with-x] [--with-rxdispencer] [--disable-ccif] [--disable-lapack] [--with-netlib-lapack] [--with-warnings] [--disable-mapslicer] [--non_shared] SYSTEM"; echo "where SYSTEM is one of:"; echo " irix irix64 convex sunos stardent titan aix hpux concentrix"; echo " ultrix esv osf1 linux freebsd linux_compaq_compilers generic"; echo " Darwin"; echo "Use uname -a to determine system type if you are unsure which to use."; exit 1' ### parse the arguments; `--' flags can be abbreviated and `=' can be ### replaced by whitespace # these made null if not interested in building the src directory: src=src ; dotsrc=./src ; if test -d unsupported/src; then unsupp=unsupported/src; dotunsupp=./unsupported; dotunsuppsrc=./unsupported/src else true fi if test -d x-windows; then xwindir=x-windows ; dotxwindir=./x-windows ; else true fi if test -d x-windows/Rotgen; then rotgendir=x-windows/Rotgen ; else true fi if test -d x-windows/Mosflm; then mosflmdir=x-windows/Mosflm ; else true fi for arg do # Handle --bindir (etc.) with a space before the argument. if test x$next_bindir = xyes; then bindir=$arg; next_bindir= elif test x$next_libdir = xyes; then libdir=$arg; next_libdir= elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir= elif test x$next_tmpdir = xyes; then TMPDIR=$arg else case $arg in -help | --help | -h | help) eval $usage;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=* | --b=*) bindir=`echo $arg | sed 's/[-a-z_]*=//'` ;; -bindir | --bindir | --bindi | --bind | --bin | --bi | --b) next_bindir=yes ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) next_srcdir=yes ;; -libdir=* | --libdir=* | --libdi=* | --libd=* | --lib=* | --li=* | --l=*) libdir=`echo $arg | sed 's/[-a-z_]*=//'` ;; -libdir | --libdir | --libdi | --libd | --lib | --li | --l) next_libdir=yes ;; -onlylibs | --onlylibs | --onlylib | --onlyli | --onlyl | --onlyl | --only | \ --onl | --on | --o) src= ; dotsrc= ; unsupp= ; dotunsupp= ; dotunsuppsrc= ;; -tmpdir=* | --tmpdir=* | --tmpdi=* | --tmpd=* | --tmp=* | --tm=* | t=*) tmpdir=`echo $arg | sed 's/[-a-z_]*=//'` ;; -with-f2c | --with-f2c | --with-f2 | --with-f) FC=fort77; XFFLAGS=${XFFLAGS:-'-Nx400'}; FOPTIM=${FOPTIM:-"-O"}; with_f2c=1; SETFLAGS=${SETFLAGS:-""} ;; -with-shared-lib | --with-shared-lib | --with-shared-li | \ --with-shared-l | --with-shared- | --with-share | --with-sha | \ --with-sh | --with-s) shared_lib=yes ;; -with-x | --with-x | --wit-x | --wi-x | \ --w-x) with_x=yes ;; -ww | -w-w | -with-warnings | -with-w | -w-warnings | \ --ww | --w-w | --with-warnings | --with-w | --w-warnings) warnings=yes ;; -with-rxdispencer | --with-rxdispencer) with_rxdispencer=yes ;; -disable-ccif | --disable-ccif) disable_ccif=yes ;; -disable-lapack | --disable-lapack) disable_lapack=yes ;; -with-netlib-lapack | --with-netlib-lapack) with_netlib_lapack=yes ;; -disable-mapslicer | --disable-mapslicer) disable_mapslicer=yes ;; -non_shared | --non_shared) non_shared=yes ;; -hush) # only for use by config.status hush=1 ;; -*) eval $usage ;; *) if test -z "$system" ; then system=$arg else eval $usage ; fi ;; # bad flag esac fi done test -z "$system" && eval $usage || true # system must be defined case $system in Darwin) ;; *) PWD=`pwd` # not always defined ;; esac srcdir=${srcdir:-$PWD} bindir=${bindir:-$PWD/bin} libdir=${libdir:-$PWD/lib} configdir=${PWD} test "$tmpdir" && TMPDIR=${tmpdir} export libdir RANLIB FC F77 FOPTIM COPTIM XFFLAGS XCFLAGS CC LNS M4 M4FLAGS export SETFLAGS MAKE F INSTALL_PROGRAM INSTALL_DATA XLDFLAGS TMPDIR ### First let's check that we know about the system. # Any new system must be added in the following case block and in # the big one later which handles each possibility. These try to be # generic operating system names rather than names of hardware. case $system in convex | concentrix | hpux | irix | irix64 | aix | stardent | sunos | \ titan | ultrix | esv | osf1 | linux | freebsd | gnu_win32 | \ linux_compaq_compilers | generic | Darwin) echo "OK, setting up for a system type of \`$system'..." echo ;; * ) echo "! System type \`$system' isn't supported -- sorry." echo echo "If one of the following alternatives doesn't seem to be suitable," echo "you'll have to modify \`configure' and the library files mentioned" echo "in the installation guide. Please let ccp4@dl.ac.uk know of any" echo "changes you have to make:" echo " irix irix64 convex sunos stardent titan aix hpux concentrix" echo " ultrix esv osf1 linux linux_compaq_compilers freebsd generic" echo " Darwin" exit 1 ;; esac if test -n "$with_f2c"; then echo "! Using f2c compiler. (Needs the \`fort77' perl script and f2c later than 19940920.)" echo "! Make sure there is no symbolic link from fort77 to g77" echo "! \`fort77' comes from, e.g. ftp://sunsite.unc.edu/pub/Linux/devel/lang/fortran" echo "" elif test "$system" = linux; then echo "! Using g77 compiler. If you have an old g77 compiler, you may be better" echo "! off using f2c, see --with-f2c option." else true fi # check for xwin stuff if test -n "$with_x"; then echo echo " Will attempt to install the xwindows programs from \`$xwindir'." echo " This is not supported for all systems." echo " ******** please note ************" echo " the xwindows programs will be compiled with an option" echo " that means errors are ignored. This could result in some" echo " xwindows programs not being compiled." else echo echo "! The x-windows programs will not be installed." echo "! If you want the x-windows programs to be installed re-run" echo "! configure with the --with-x flag." fi # check for disabling of ccif if test -n "$disable_ccif"; then echo echo " Installation of the CCIF library has been suppressed." echo " Some functionality will be lost." else echo echo " The CCIF library will be built and installed." echo " This has been tested on the most common systems, but if " echo " you have problems, use the --disable-ccif flag." fi # check for disabling of lapack if test -n "$disable_lapack"; then echo echo " Inclusion of the LAPACK linear algebra package has been suppressed." echo " Some programs may not build and the installation may fail." else echo echo " The LAPACK linear algebra package will be included in the installation." if test ! "$with_netlib_lapack"; then echo " Configure will search for existing LAPACK and BLAS libraries on" echo " on your system - if a version of LAPACK is not found then the NetLib" echo " version will be built for you automatically." echo " If you want NetLib LAPACK and BLAS to be used regardless of" echo " system libraries then rerun configure using --with-netlib-lapack" else echo " Netlib LAPACK and BLAS will be built automatically, regardless of" echo " other versions which might be available on your system." echo " Using Netlib BLAS may result in poorer performance of the LAPACK" echo " functions - to search for system-specific versions rerun configure" echo " without the --with-netlib-lapack flag." fi echo echo " To disable inclusion of LAPACK, use the --disable-lapack flag" echo " (This is not recommended as some programs will fail to build)" fi # Check for disabling of mapslicer command library if test -n "$disable_mapslicer"; then echo echo " Building of the CCP4i MapSlicer command library has been suppressed." echo " As a result you will not be able to use the MapSlicer viewer." else echo echo " Configure will try to set up and build the CCP4i MapSlicer command" echo " library, which is required to use the MapSlicer viewer." echo " ***** This may not be possible for some systems! *****" echo " To disable inclusion of the MapSlicer command library, use the" echo " --disable-mapslicer flag" fi # Check for non_shared option (OSF1) if test -n "$non_shared"; then echo echo " You have requested a non-shared build (--non_shared)." # Only available for OSF1 if test "$system" = osf1; then # Not compatible with shared lib if test "$shared_lib" = yes; then echo " ***** This option is not compatible with --with-shared-lib ***** " echo " Rerun configure using only one of these options." exit 1 fi echo " Executables will be built using the -non_shared compiler" echo " flag. This will result in more portable (but much larger)" echo " executables." else echo " This option is not supported for systems other than osf1." fi fi ### Check the values of the necessary environment variables badvar=0 # set true if any of the checks fail # fixme: do we need to check BINSORT_MEM? for i in BINSORT_SCR CCP4_SCR CINCL CLIBD CCP4_OPEN PUBLIC_FONT84 \ # BINSORT_MEM do if eval test -z \"\$$i\" ; then echo "! Please set environment variable $i (see installation instructions)." badvar=1 else true fi done test $badvar -eq 1 && exit 1 || true ### establish the necessary directories for building and installing ### and check that a scratch directory can be created # shorthand for a warning needed in some cases: # syswarn() { # echo # echo "! Beware -- the $system installation isn't properly tested." ; } syswarn='echo; echo "! Beware -- the $system installation is not properly tested."' for i in CCP4_SCR BINSORT_SCR; do if eval test -d \$$i || eval mkdir \$$i; then : else eval echo "! No directory \$$i and can\'t create it." echo " Check the value of $i." badvar=1 fi done for i in libdir bindir; do if eval test -d \$$i || eval mkdir \$$i; then : else eval echo "! No directory \$$i and can\'t create it." echo " Check the argument of --$i." badvar=1 fi done for i in $dotsrc $dotunsupp $dotunsuppsrc ./lib ./lib/src ./lib/data ./ccp4i/etc/unix $mosflmdir/lib $mosflmdir/bin $mosflmdir/cbf/lib ; do if test -d $i || mkdir $i; then : else eval echo "! No directory $i and can\'t create it." badvar=1 fi done ### sanity checks badvar=0 if test ! -f $srcdir/lib/src/ccplib.f ; then echo "! $srcdir/lib/src/ccplib.f doesn't exist." echo " Check the value of the --srcdir flag." badvar=1 else true fi if touch $BINSORT_SCR/binsort$$ ; then rm $BINSORT_SCR/binsort$$ else echo "! Can't create $BINSORT_SCR/binsort$$." echo " Check the value of BINSORT_SCR." badvar=1 fi test $badvar -eq 1 && exit 1 || true ### Do specific things for each possible system. Note we preserve any ### supplied values of the variables with the ${...:-...} mechanism. if test ! "$hush" ; then if test "${FC}" && test -z "$with_f2c"; then echo "! You have specified a non-default Fortran compiler ($FC)." echo " This probably only makes sense if you have made the appropriate" echo " changes to the Fortran-C interface routines." else true fi else true fi # if configure run by config.status dont adding warning flags again. test "$hush" = 1 && warnings=yes || true LDFLAG='-L$(LIB_DIR)' # overridden only for alliant ### To add a new system, see the explanation of variables below case $system in irix) # tested in 4.0.{1,5}, probably ok in 3.3 RANLIB=${RANLIB:-:} test "$with_f2c" && M4=${M4-"m4 -D_f2c=1"} # fixme: this ought to test the *compiler* version (using `versions') case `uname -rs` in IRIX\ 4.0*) # more nested loops (?), optimise larger routines, use shared # libraries -- no provision for parallelisation, try to trap # undefined variables, don't want to waste time with cpp # fixme: -trapuv causing havoc due to undefined variables -- should be # put back after fixing as many as poss. # XFFLAGS=${XFFLAGS:-"-Nc45 -Olimit 1500 -share_all -trapuv -nocpp"} XFFLAGS=${XFFLAGS:-"-Olimit 1500 -nocpp"} # XLDFLAGS=${XLDFLAGS:-"-lfpe"} # to enable floating point traps # -Nq for `too many equivalences' (??) SETFLAGS=${SETFLAGS:-"amore_FLAGS='-O1 -Nq2500 -nocpp'"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_4"} ;; IRIX\ 5.*) # apparently this is OK for the new SysVile.4-based OS (but don't # try to share irix4 libraries, at least) XFFLAGS=${XFFLAGS:-"-Olimit 1500 -nocpp -w -Wf,-I${srcdir}/lib/src"} XCFLAGS=${XCFLAGS:-"-DPROTOTYPE -w"} FOPTIM=${FOPTIM:-"-O2"} # XLDFLAGS=${XLDFLAGS:-"-lfpe"} # to enable floating point traps # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_5"} # -Nq for `too many equivalences' (??) # sopt was broken in v4. You might think it would help here, but it's # a loss, for some reason SETFLAGS=${SETFLAGS:-"amore_FLAGS='-O1 -Nq2500 -nocpp' \ sftools_FLAGS='$XFFLAGS $FOPTIM -Nq3000' \ detwin_FLAGS='$XFFLAGS $FOPTIM -static' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C -static' "} # we need to worry about rewinding scratch files with 5.1 fortran # (and apparently also with 5.2): M4=${M4:-"m4 -D_sgi=1 -D_irix51=1"} if test "$shared_lib" = yes; then SHARE_LIB=${SHARE_LIB:-'ld -shared -all libccp4.a -o libccp4.so'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.so $(libdir)/libccp4.so' XCFLAGS="$XCFLAGS -rpath $CLIB" XFFLAGS="$XFFLAGS -rpath $CLIB" fi case `uname -sr` in IRIX\ 5.1*) echo "! Beware -- f77 in Irix5.1 is supposed to be badly broken" ;; esac ;; IRIX64\ 6.*|IRIX\ 6.*) echo "* SGI machines with IRIX6.* can run either 32 or" echo "* 64-bit compiled programs." echo "* With the system option irix the code will compile under " echo "* the 32-bit option." echo "* NB for pre-6.5 systems this will be -(o)32 (old API)" echo "* for IRIX6.5 it will be -n32 (new API)." echo "* Please note that the two APIs are not compatible." echo "* For R2000/R3000 you may need to add -mips1." echo "* If you have IRIX 6.3 or above and want to try the 64 bit" echo "* compilation run configure again with the system choice irix64." echo "* This is not tested on systems running irix6.2 or below." echo # case `uname -sr` in IRIX64\ 6.0*|IRIX\ 6.0*) # This is said to work on unknown Irix6 minor version by # george@tusk.med.harvard.edu (George Planansky) XFFLAGS=${XFFLAGS:-"-32 -nocpp"} XCFLAGS=${XCFLAGS:-"-32 -DPROTOTYPE"} # XLDFLAGS=${XLDFLAGS:-"-lfpe"} FOPTIM=${FOPTIM:-"-O2"} # -Nq still needed in 6.01, apparently, but not later versions. SETFLAGS=${SETFLAGS:-"amore_FLAGS='$XFFLAGS -Nq2500' \ sftools_FLAGS='$XFFLAGS $FOPTIM -Olimit 1250 -Nq3000' \ detwin_FLAGS='$XFFLAGS $FOPTIM -static' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C -static' "} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; IRIX64\ 6.1*|IRIX\ 6.1*) # -lfpe no longer exists - replacement sought. # tnearnest@LBL.Gov (Thomas Earnest) following SGI rep. says for 6.1: # Heaven knows how you're supposed to trap FPEs... XFFLAGS=${XFFLAGS:-"-32 -nocpp "} XCFLAGS=${XCFLAGS:-"-32 -DPROTOTYPE"} XLDFLAGS=${XLDFLAGS:-""} # Or use -O3 for agressive optimisation. FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; IRIX64\ 6.2*|IRIX\ 6.2*) XFFLAGS=${XFFLAGS:-"-32 -w -nocpp"} XCFLAGS=${XCFLAGS:-"-32 -w -DPROTOTYPE"} # XLDFLAGS=${XLDFLAGS:-"-lfpe"} # Or use -O3 for agressive optimisation. FOPTIM=${FOPTIM:-"-O2 -Olimit 3000"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; IRIX64\ 6.3*|IRIX\ 6.3*) # e.g. O2's XFFLAGS=${XFFLAGS:-"-32 -w -nocpp"} XCFLAGS=${XCFLAGS:-"-32 -w -DPROTOTYPE"} XLDFLAGS=${XLDFLAGS:-""} FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; IRIX64\ 6.4*|IRIX\ 6.4*) # e.g. Origin200 XFFLAGS=${XFFLAGS:-"-32 -w -nocpp"} XCFLAGS=${XCFLAGS:-"-32 -w -DPROTOTYPE"} XLDFLAGS=${XLDFLAGS:-""} FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6_4"} ;; IRIX64\ 6.5*|IRIX\ 6.5*) XFFLAGS=${XFFLAGS:-"-n32 -mips3 -nocpp"} XCFLAGS=${XCFLAGS:-"-n32 -mips3 -DPROTOTYPE"} XLDFLAGS=${XLDFLAGS:-""} FOPTIM=${FOPTIM:-"-O2"} # Shared libraries only if requested if test "$shared_lib" = yes; then SHARED_LIB_FLAGS=${SHARED_LIB_FLAGS-'-n32 -mips3'} SHARE_LIB=${SHARE_LIB-'ld -n32 -mips3 -shared -all libccp4.a -o libccp4.so'} fi # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6_5"} if test ! "$warnings" = yes; then XFFLAGS="-w $XFFLAGS" XCFLAGS="-w $XCFLAGS" fi SETFLAGS=${SETFLAGS:-"sftools_FLAGS='$XFFLAGS $FOPTIM -OPT:Olimit=1500 ' \ detwin_FLAGS='$XFFLAGS $FOPTIM -static' \ sfcheck_FLAGS='$XFFLAGS $FOPTIM -OPT:Olimit=2180' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C -static' "} # Set Mapslicer command library flags # These are the flags appropriate for Irix 6.5 (n32) MAPSLICER_LIBS=${MAPSLICER_LIBS:-"-lftn"} MAPSLICER_SHARE=${MAPSLICER_SHARE:-"ld -n32 -mips3 -shared -all libccp4map.a -o libccp4map.so"} ;; *) XFFLAGS=${XFFLAGS:-"-32 -w -nocpp"} XCFLAGS=${XCFLAGS:-"-32 -w -DPROTOTYPE"} XLDFLAGS=${XLDFLAGS:-""} FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_5"} ;; esac SETFLAGS=${SETFLAGS:-"sftools_FLAGS='$XFFLAGS $FOPTIM -Olimit 1250 -Nq3000' \ detwin_FLAGS='$XFFLAGS $FOPTIM -static' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C -static' "} M4=${M4:-"m4 -D_sgi=1 -D_irix51=1"} SHARED_LIB_FLAGS=${SHARED_LIB_FLAGS:-'-32'} if test "$shared_lib" = yes; then SHARE_LIB=${SHARE_LIB:-'ld -32 -shared -all libccp4.a -o libccp4.so'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.so $(libdir)/libccp4.so' XCFLAGS="$XCFLAGS -rpath $CLIB" XFFLAGS="$XFFLAGS -rpath $CLIB" fi # Set Mapslicer command library flags # These flags are appropriate for o32 Irixes MAPSLICER_LIBS=${MAPSLICER_LIBS:-"-lftn"} MAPSLICER_SHARE=${MAPSLICER_SHARE:-"ld -32 -shared -all libccp4map.a -o libccp4map.so"} ;; IRIX*) XFFLAGS=${XFFLAGS:-"-32 -Olimit 1500 -nocpp"} # XLDFLAGS=${XLDFLAGS:-"-lfpe"} # to enable floating point traps # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6_5"} echo "! Beware -- this is a substantially different OS version to those tested" ### Mapslicer flags for Irix can go here - this section is ### for an older version of Irix so no shared build MAPSLICER_LIBS=${MAPSLICER_LIBS:-"-lftn"} MAPSLICER_SHARE=${MAPSLICER_SHARE:-""} ;; *) echo "! This doesn't appear to be an IRIX system. you should run configure on a machine of the correct type." exit 1 ;; esac # Each version of the irix compiler seems to bring a different set # of optimisation problems, some of which we probably never find out # about. The default optimisation seems to be the best thing to go # with. Maybe you can win in some cases by using -O2, caveat emptor... FOPTIM=${FOPTIM:-""} M4=${M4:-"m4 -D_sgi=1"} ;; irix64) # new option added to allow users to have 64bit compilatioins. RANLIB=${RANLIB:-:} test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} # fixme: this ought to test the *compiler* version (using `versions') case `uname -rs` in IRIX64\ 6.*|IRIX\ 6.*) echo "* IRIX6.* can run on 32 or 64-bit machines." echo "* You have chosen to compile the suite as 64 bit code. " echo "* 32 bit SGI machines will not be able to run 64 bit programs." echo "* The 64 bit compilation is relativley untested especially on " echo "* irix6.2 and below." echo "* Please report problems or changes to ccp4@dl.ac.uk." # # Below is the origional suggestion by Adam in 1997 # # Example for compiling code with -64 option. I believe this is currently # only appropriate for R8000s and R10000s. Also, notice that the options # are different from those when using -32. The C and F flags are given # below and others remain the same. Also, if you are using shared libraries # then you need to alter $SHARE_LIB. Perhaps better performance can be # gained with additional optimisations but code integrity is not # guaranteed. Adam 21/01/97. #XFFLAGS=${XFFLAGS:-"-64 -mips4 -r10000 -nocpp -TENV:trapuv=ON -OPT:Olimit=1500 -w"} #XCFLAGS=${XCFLAGS:-"-64 -mips4 -r10000 -trapuv -DPROTOTYPE -w"} #SHARE_LIB=${SHARE_LIB:-"ld -64 -mips4 -shared -all libccp4.a -o libccp4.so"} # # 02-02-00: replacing mips4 with mips3 ... this might mean some loss of # performance for some systems, but will result in more portable executable code. case `uname -sr` in IRIX64\ 6.0*|IRIX\ 6.0*) # This is said to work on unknown Irix6 minor version by # george@tusk.med.harvard.edu (George Planansky) echo "\n* Warning this option is not tested *\n" XFFLAGS=${XFFLAGS:-"-64 -mips3 -nocpp -OPT:Olimit=1500 -w"} XCFLAGS=${XCFLAGS:-"-64 -DPROTOTYPE -w"} # XLDFLAGS=${XLDFLAGS:-"-lfpe"} FOPTIM=${FOPTIM:-"-O2"} # -Nq still needed in 6.01, apparently, but not later versions. SETFLAGS=${SETFLAGS:-"amore_FLAGS='$XFFLAGS' \ sftools_FLAGS='$XFFLAGS $FOPTIM' \ detwin_FLAGS='$XFFLAGS $FOPTIM -static' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C -static'"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; IRIX64\ 6.1*|IRIX\ 6.1*) # -lfpe no longer exists - replacement sought. # tnearnest@LBL.Gov (Thomas Earnest) following SGI rep. says for 6.1: # Heaven knows how you're supposed to trap FPEs... echo "\n* Warning this option is not tested *\n" XFFLAGS=${XFFLAGS:-"-64 -mips3 -nocpp -OPT:Olimit=1500 -w"} XCFLAGS=${XCFLAGS:-"-64 -DPROTOTYPE -w"} XLDFLAGS=${XLDFLAGS:-""} FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; IRIX64\ 6.2*|IRIX\ 6.2*) XFFLAGS=${XFFLAGS:-"-64 -mips3 -nocpp -OPT:Olimit=1500 -w"} XCFLAGS=${XCFLAGS:-"-64 -DPROTOTYPE -w"} # XLDFLAGS=${XLDFLAGS:-"-lfpe"} # Or use -O3 for agressive optimisation. FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; IRIX64\ 6.3*|IRIX\ 6.3*) # e.g. O2's XFFLAGS=${XFFLAGS:-"-64 -mips3 -nocpp -OPT:Olimit=1500 -w"} XCFLAGS=${XCFLAGS:-"-64 -DPROTOTYPE -w"} XLDFLAGS=${XLDFLAGS:-""} FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; IRIX64\ 6.4*|IRIX\ 6.4*) # e.g. Origin200 XFFLAGS=${XFFLAGS:-"-64 -mips3 -nocpp -OPT:Olimit=1500 -w"} XCFLAGS=${XCFLAGS:-"-64 -DPROTOTYPE -w"} # XLDFLAGS=${XLDFLAGS:-"-lfpe"} FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; IRIX64\ 6.5*|IRIX\ 6.5*) XFFLAGS=${XFFLAGS:-"-64 -mips3 -nocpp -OPT:Olimit=1500 -w"} XCFLAGS=${XCFLAGS:-"-64 -DPROTOTYPE -w"} XLDFLAGS=${XLDFLAGS:-""} FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6_5"} ;; *) XFFLAGS=${XFFLAGS:-"-64 -mips3 -nocpp -OPT:Olimit=1500 -w"} XCFLAGS=${XCFLAGS:-"-64 -DPROTOTYPE -w"} XLDFLAGS=${XLDFLAGS:-""} FOPTIM=${FOPTIM:-"-O2"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6"} ;; esac SETFLAGS=${SETFLAGS:-"sftools_FLAGS='$XFFLAGS $FOPTIM -Nq3000' \ detwin_FLAGS='$XFFLAGS $FOPTIM -static' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C -static' "} M4=${M4:-"m4 -D_sgi=1 -D_irix51=1"} SHARED_LIB_FLAGS=${SHARED_LIB_FLAGSL:-'-64'} if test "$shared_lib" = yes; then SHARE_LIB=${SHARE_LIB:-'ld -64 -mips3 -shared -all libccp4.a -o libccp4.so'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.so $(libdir)/libccp4.so' XCFLAGS="$XCFLAGS -rpath $CLIB" XFFLAGS="$XFFLAGS -rpath $CLIB" fi ;; IRIX64*) XFFLAGS=${XFFLAGS:-"-OPT:Olimit=1500 -nocpp"} # XLDFLAGS=${XLDFLAGS:-"-lfpe"} # to enable floating point traps # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"IRIX_6_5"} echo "! Beware -- this is a substantially different OS version to those tested" ;; *) echo "! This doesn't appear to be an IRIX64 system." echo "! you should run configure on a machine of the correct type." exit 1 ;; esac # Each version of the irix compiler seems to bring a different set # of optimisation problems, some of which we probably never find out # about. The default optimisation seems to be the best thing to go # with. Maybe you can win in some cases by using -O2, caveat emptor... FOPTIM=${FOPTIM:-""} M4=${M4:-"m4 -D_sgi=1"} ;; esv) if test -n "$with_x"; then echo "! Xwindows installation has not been tested !" echo "! for this system and so will not be attempted.!" with_x= fi # first make sure we have the BSD stuff e.g. `which' on the path # (might it ever be missing?) PATH=/bsd43/bin:/usr/ucb:$PATH # similar to irix (from LMB): case `uname -rv` in 2.3\ UMIPS) ;; *UMIPS) echo "! Beware -- this is a substantially different OS version to those tested";; *) echo "! This doesn't appear to be an ESV system. you should run configure on a machine of the correct type." exit 1 ;; esac case `what \`which f77\`` in *ES/os\ 2.2alpha) XFFLAGS=${XFFLAGS:-"-systype bsd43 -Nc45 -nocpp -Olimit 1500"} # uopt fails: SETFLAGS=${SETFLAGS:-"ecalc_FLAGS='-systype bsd43' \ tffc_FLAGS='-systype bsd43' fhscal_FLAGS='-systype bsd43' \ amore_FLAGS='-systype bsd43 -O0'"} # there are posix headers in /usr/include/posix, but the BSD fcntl # gets included as well as the posix one and there is a clash, # causing a fatal error. thus use NOUNISTD to avoid unistd.h in library.c XCFLAGS=${XCFLAGS:-"-systype bsd43 -DESV -DNOUNISTD"} # use BSD universe (a la LMB) ;; *) # fixme: -trapuv as for IRIX # XFFLAGS=${XFFLAGS:-"-Nc45 -trapuv -nocpp -Olimit 1500"} ;; XFFLAGS=${XFFLAGS:-"-Nc45 -nocpp -Olimit 1500"} ;; esac FOPTIM=${FOPTIM:-"-O2"} XCFLAGS=${XCFLAGS:-"-systype bsd43 -DESV -DNOUNISTD"} # use BSD universe (a la LMB) test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} M4=${M4:-"m4 -D_esv=1"} # `-s' breaks fsplit, sigh INSTALL_PROGRAM=${INSTALL_PROGRAM:-"/bsd43/bin/install -c"} INSTALL_DATA=${INSTALL_DATA:-"/bsd43/bin/install -m 644 -c"} ;; stardent | titan) # from aberg@titan.embl-grenoble.fr (Anders Aberg) # on `TitanOS 4.2 P1' # Update from tax@titan.embl-grenoble.fr (Takemasa KAWASHIMA) if test -n "$with_x"; then echo "! Xwindows installation has not been tested !" echo "! for this system and so will not be attempted.!" with_x= fi case `uname -sr` in "TitanOS 4") ;; "TitanOS") echo "! Beware -- this is a substantially different OS version to those tested";; *) echo "! This doesn't appear to be a Titan system. You should run configure on a machine of the correct type." esac FC=${FC:-f77} XFFLAGS=${XFFLAGS:-"-continuations=50 -w"} # -w suppresses warnings FOPTIM=${FOPTIM:-"-O2"} # vectorisation RANLIB=${RANLIB:-":"} XCFLAGS=${XCFLAGS:-"-DNOSTDLIB"} test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} || true M4=${M4:-"m4 -D_titan=1"} echo; echo "! Beware -- the $system installation is not tested." ;; aix) # (tested in AIX 3.2, xlf v2.2 (?) but can't # find a way to get the compiler version) # if test -n "$with_x"; then # echo "! Xwindows installation has not been tested !" # echo "! for this system and so will not be attempted.!" # with_x= # fi # Automated x-install for AIX from Sandra McLaughlin (March 2000) FC=${FC:-xlf} case `uname -vrs` in "AIX 2 3") ;; # 3.2, not 2.3 AIX*) echo "! Beware -- this is a substantially different OS version to those tested";; *) echo "! This doesn't appear to be an AIX system. You should run configure on a machine of the correct type." exit 1 ;; esac # avoid truncation to character*500 and ensure that the default # handling of external names is in force (no postfixed `_') and use # larger internal table sizes XFFLAGS=${XFFLAGS:-"-qcharlen=4000 -qnoextname -NQ20000 -NT40000"} FOPTIM=${FOPTIM:-"-O"} test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} M4=${M4:-"m4 -D_AIX=1"} SETFLAGS=${SETFLAGS:-"amore_FLAGS='$XFFLAGS $LDFLAGS' tracer_FLAGS='$XFFLAGS' \ fftbig_FLAGS='$XFFLAGS $FOPTIM -qintlog' \ xdlmapman_FLAGS='$XFFLAGS -qfixed=80'"} # this seems not to be exactly BSD install, but looks OK to use: INSTALL_PROGRAM=${INSTALL_PROGRAM:-"/usr/ucb/install -c"} INSTALL_DATA=${INSTALL_DATA:-"/usr/ucb/install -m 644 -c"} # Xwindows variables set if wanted or not! # But I don't know what to set XTYPE to (or what it is used for) ! XDL_LIB=${XDL_LIB:-"${CCP4_LIB}/libxdl_view.a"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt -lXext"} XTYPE=${XTYPE:-"AIX"} if test "$shared_lib" = yes; then SHARE_LIB=${SHARE_LIB:-'ld -G -bnoentry -bexpall libccp4.a -o libccp4.so'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.so $(libdir)/libccp4.so' fi # echo; echo "! Beware -- the $system installation is not fully tested." ;; concentrix) # tested under v 2.2.00 on 2800 system # fixme: what other breeds of Alliant are there? # from LMB (for concentrix 2.2) if test -n "$with_x"; then echo "! Xwindows installation has not been tested !" echo "! for this system and so will not be attempted.!" with_x= fi case `uv|head -1` in *Alliant\ Concentrix\ 2800\ 2.2*) CFLAGS=${CFLAGS:-"-Dconcentrix2 -DNOUNISTD"} ;; *Alliant\ Concentrix\ 2800\ 2.*) CFLAGS=${CFLAGS:-"-Dconcentrix2 -DNOUNISTD"} echo "! Beware -- this is a substantially different OS version to those tested";; # beware the tabs in this! *Alliant*Concentrix\ 2800*3*) ;; # now has posix.1 *Concentrix*) echo "! Beware -- this is a substantially different OS version to those tested";; *) echo "! This doesn't appear to be a Concentrix system. You should run configure on a machine of the correct type." exit 1 ;; esac # `fortran -v 2>&1|head -1` = fortran , version 1.3.0 FC=${FC:-fortran} CC=${CC:-scc} # scalar version (default?) CFLAGS=${CFLAGS:-"-uniproc"} XCFLAGS=${XCFLAGS:-"-uniproc"} COPTIM=${COPTIM:-"-Og"} XFFLAGS=${XFFLAGS:-"-uniproc"} # -ieee only on polarrfn (speed), procheck programs must be -save SETFLAGS=${SETFLAGS:-"almn_FLAGS='-uniproc' scaleit_FLAGS='-uniproc -ieee'\ vecref_FLAGS='-uniproc -ieee' polarrfn_FLAGS='-uniproc -ieee'\ anglen_FLAGS='-uniproc -save' secstr_FLAGS='-uniproc -save' \ proclean_FLAGS='-uniproc -save' pplot_FLAGS='-uniproc -save'"} FOPTIM=${FOPTIM:-"-Og"} LDFLAG= # have to use LD_PATH instead, sigh INSTALL_PROGRAM=${INSTALL_PROGRAM:-"/usr/bin/install -c"} INSTALL_DATA=${INSTALL_DATA:-"/usr/bin/install -m 644 -c"} ;; convex) if test -n "$with_x"; then echo "! Xwindows installation has not been tested !" echo "! for this system and so will not be attempted.!" with_x= fi # for os8.1 (fc 6.1) originally, also tried on 10.0 (fc 7.0) case `vers /vmunix` in /vmunix:\ 8.*) XFFLAGS=${XFFLAGS:-"-or none"} MAKE=${MAKE:-make} # old Convex make doesn't set it ;; /vmunix:\ 10.*) # IJT says -noptst to fit in 600 megs VM! XFFLAGS=${XFFLAGS:-"-noptst -or none"} ;; /vmunix:*) XFFLAGS=${XFFLAGS:-"-or none"} echo "! Beware -- this is a substantially different OS version to those tested";; *) echo "! This doesn't appear to be a Convex system. You should run configure on a machine of the correct type." exit 1 ;; esac FC=${FC:-fc} FOPTIM=${FOPTIM:-"-O2"} # vectorisation M4=${M4:-"m4 defs.m4"} if test "$with_f2c"; then echo 'define(_f2c,1)dnl' > lib/src/defs.m4 else echo 'define(_convex,1)dnl' > lib/src/defs.m4 fi # convex ar won't create the archive with `ar r': ar cq lib/src/libccp4.a INSTALL_PROGRAM=${INSTALL_PROGRAM:-"/usr/bin/install -c"} INSTALL_DATA=${INSTALL_DATA:-"/usr/bin/install -m 644 -c"} ;; sunos) # for os4.1, f771.4, at least case `uname -rs` in SunOS\ 4.1*) test "$with_f2c" && M4=${M4:-"/usr/5bin/m4 -D_f2c=1"} M4=${M4:-"/usr/5bin/m4 -D_sun=1"} # SysVile version INSTALL_PROGRAM=${INSTALL_PROGRAM:-"/usr/bin/install -c"} INSTALL_DATA=${INSTALL_DATA:-"/usr/bin/install -m 644 -c"} XTYPE=${XTYPE:-"SUNOS_4"} if test -z "$CC"; then # Look for an ANSI C compiler case `type acc` in *acc) CC=acc;; *) case `type gcc` in *gcc) CC=gcc;; *) echo "! Can't find GCC or the SunPro compiler." echo "! The default \`cc' won't compile \`solomon' or the XCCPJIFFY stuff." esac;; esac fi if test -n "$with_x"; then echo "! Xwindows installation has not been tested !" echo "! for this system and so will not be attempted.!" with_x= fi ;; SunOS\ 5*) test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} M4=${M4:-"m4 -D_sun=1"} # (presumably) RANLIB=${RANLIB:-:} # I know this much INSTALL_PROGRAM=${INSTALL_PROGRAM:-"/usr/ucb/install -c"} INSTALL_DATA=${INSTALL_DATA:-"/usr/ucb/install -m 644 -c"} XTYPE=${XTYPE:-"SUNOS_5"} # We use specific paths here, as Sun distribute old cc as well. FC=${FC:-/opt/SUNWspro/bin/f77} CC=${CC:-/opt/SUNWspro/bin/cc} if [ "$shared_lib" = yes ]; then XFFLAGS=${XFFLAGS:-"-Nl45 -PIC"} XCFLAGS=${XCFLAGS:-"-PIC"} SHARE_LIB=${SHARE_LIB-'ld -dy -G -z allextract -z text libccp4.a -o libccp4.so'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.so $(libdir)/libccp4.so' fi FOPTIM=${FOPTIM:-"-O3"} # -fast is a possibility XFFLAGS=${XFFLAGS:-"-Nl45"} # more continuation lines XCFLAGS=${XCFLAGS:-""} # Test to see if warnings should not be suppressed if test ! "$warnings" = yes; then XFFLAGS="-w $XFFLAGS" XCFLAGS="-w $XCFLAGS" fi SETFLAGS=${SETFLAGS:-"amore_FLAGS=' $XFFLAGS -O1'"} # Set Mapslicer command library flags # For SunOS Fortran run-time library is libF77 MAPSLICER_LIBS=${MAPSLICER_LIBS:-"-L/opt/SUNWspro/lib -lsunmath -lM77 -lF77"} # ld complains about -xlic_lib=sunperf option # MAPSLICER_SHARE=${MAPSLICER_SHARE:-"ld -dy -G -z allextract -z text libccp4map.a -o libccp4map.so"} MAPSLICER_SHARE=${MAPSLICER_SHARE:-""} if test -n "$with_x"; then XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-L/usr/openwin/lib -lXt -lSM -lX11 -lICE"} fi echo "! Beware -- the SunOS5 installation is known to be buggy";; SunOS*) test "$with_f2c" && M4=${M4:-"/usr/5bin/m4 -D_f2c=1"} M4=${M4:-"/usr/5bin/m4 -D_sun=1"} # SysVile version echo "! Beware -- this is a substantially different OS version to those tested";; *) echo "! This doesn't appear to be a SunOS system. You should run configure on a machine of the correct type." exit 1 ;; esac FOPTIM=${FOPTIM:-"-O3"} # -fast is a possibility XFFLAGS=${XFFLAGS:-"-Nl45"} # more continuation lines (until # problems removed) SETFLAGS=${SETFLAGS:-"amore_FLAGS='$XCFLAGS\ $LDFLAGS\ -O1'"} ;; hpux) if test -n "$with_x"; then echo "! Xwindows installation has not been tested !" echo "! for this system and so will not be attempted.!" with_x= fi case `uname -sr` in HP-UX\ A.08.*) # uname -a: HP-UX tcs-hp0 A.08.07 A 9000/750 2002285682 XLDFLAGS=${XLDFLAGS:-"-lfsys -lm"} # access to routines f77 # -lm for solomon XFFLAGS=${XFFLAGS:-"+T +E1"} # +T is trap signals, +E1 gets access to # IDATE etc M4=${M4:-"m4 -D_hpux=1"} SETFLAGS=${SETFLAGS:-"prepform_FLAGS='$XFFLAGS' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C'"} # exclude optimisation ;; HP-UX\ A.09.*) # uname -a: HP-UX tcs-hp0 A.09.01 A 9000/755 2002285682 two-user license # floating point traps and access to routines f77 XLDFLAGS=${XLDFLAGS:-"+FPVZO -lfsys -lm"} # Note that this is the documented way to get IDATE, and gives you the # usual unix variant. I think in HPUX8, +E1 was OK. We need a new flag # to know whether to use SECNDS or not, at least, since we don't seem to # be able to get both E1 and U77. # -lm for solomon XFFLAGS=${XFFLAGS:-"+U77 -w"} # access to IDATE etc XCFLAGS=${XCFLAGS:-"-w"} M4=${M4:-"m4 -D_hpux=1 -D_hpux9=1"} SETFLAGS=${SETFLAGS:-"prepform_FLAGS='$XFFLAGS' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C'"} # exclude optimisation if test "$shared_lib" = yes; then SHARE_LIB=${SHARE_LIB:-'ld -b +s libccp4.a -o libccp4.sl'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.sl $(libdir)/libccp4.sl' fi ;; HP-UX\ B.10.*) # Thanks to Morten Kjeldgaard XLDFLAGS=${XLDFLAGS:-"+FPVZO -lfsys -lm"} FOPTIM=${FOPTIM:-"-O2"} XFFLAGS=${XFFLAGS:-"+U77 -w"} # access to IDATE etc XCFLAGS=${XCFLAGS:-"-w"} M4=${M4:-"m4 -D_hpux=1 -D_hpux10=1"} SETFLAGS=${SETFLAGS:-"prepform_FLAGS='$XFFLAGS' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C'"} # exclude optimisation if test "$shared_lib" = yes; then SHARE_LIB=${SHARE_LIB:-'ld -b +s libccp4.a -o libccp4.sl'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.sl $(libdir)/libccp4.sl' fi ;; "HP-UX U.09*") # What you get from on Convex-rebadged HP-SUX # (honestly!) if test ! -x /usr/convex/bin/fc; then echo "! This is a strange version of HPUX -- apparently not the Convex one." echo "! Don't know how to deal with it; contact ccp4 with details." exit 1 else true; fi FC=${FC:-fc} # convex compiler M4=${M4:-"m4 -D_convex=1"} XFFLAGS=${XFFLAGS:-"-or none"} XLDFLAGS=${XLDFLAGS:-"-lm"} FOPTIM=${FOPTIM:-"-O2"} # ``On HP AMORE can give problems when compliled with -O, You need to # complile it with -N.'' quoth MATTEVI@IPVGEN.UNIPV.IT. No reports of # this under HPUX8. SETFLAGS=${SETFLAGS:-"amore_FLAGS='$XCFLAGS\ $LDFLAGS\ -N' \ prepform_FLAGS='$XFFLAGS' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C'"} # exclude optimisation ;; HP-UX*) echo "! Beware -- this is a substantially different OS version to those tested" XLDFLAGS=${XLDFLAGS:-"-lfsys -lm"} # access to routines f77 # -lm for solomon XFFLAGS=${XFFLAGS:-"+U77 -w"} XCFLAGS=${XCFLAGS:-"-w"} M4=${M4:-"m4 -D_hpux=1"} SETFLAGS=${SETFLAGS:-"prepform_FLAGS='$XFFLAGS' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C'"} # exclude optimisation ;; *) echo "! This doesn't appear to be a HP-UX system. You should run configure on a machine of the correct type." exit 1 ;; esac # what `which fort77`: HP-UX Fortran/9000s700 09/19/91 B2408A.08.07 # what `which cc' HP92453-01 A.08.71 HP C (Bundled) Compiler FC=${FC:-fort77} COPTIM=${COPTIM:-""} # doesn't have -O FOPTIM=${FOPTIM:-"-O"} RANLIB=${RANLIB:-:} test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} INSTALL_PROGRAM=${INSTALL_PROGRAM:-"cp"} INSTALL_DATA=${INSTALL_DATA:-"cp"} ;; ultrix) # 3.2? if test -n "$with_x"; then echo "! Xwindows installation has not been tested !" echo "! for this system and so will not be attempted.!" with_x= fi case `uname -sr` in # ULTRIX\ 4.2) ;; ULTRIX*) # echo "! Beware -- this is a substantially different OS version to those tested" ;; *) echo "! This doesn't appear to be an Ultrix system. You should run configure on a machine of the correct type." exit 1 ;; esac # Dec are now supplying `DEC Fortran' rather than the MIPS compiler. # Significant differences, sigh. case `what \`which f77\` | tail +2` in *DEC\ Fortran\ Compiler\ Driver*) # e.g., (with leading whitespace) # DEC Fortran Compiler Driver X3.1-14 M4=${M4:-"m4 -D_dec_fortran=1"} ;; # else assume MIPS compiler -- should find out how to identify it esac test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} || true SETFLAGS=${SETFLAGS:-"amore_FLAGS='-O0\ absurd_FLAGS=-O0'"} # fixme: is this still necessary? FOPTIM=${FOPTIM:-"-O2"} INSTALL_PROGRAM=${INSTALL_PROGRAM:-"/usr/bin/install -c"} INSTALL_DATA=${INSTALL_DATA:-"/usr/bin/install -m 644 -c"} # -O4 is default in version 3.10. that version supports -trapuv #echo; echo "! Beware -- the $system installation is not fully tested." ;; osf1) case `uname -sr` in # This may be changing in `DEC Unix' (?). # v3.2c is reported to have problems with GNU stuff related to # the loader, I think. OSF1\ V3*|OSF1\ V4*) # I don't know whether -assume dummy_aliases is supported/needed in # earlier versions... XFFLAGS=${XFFLAGS:-"-fpe0 -assume dummy_aliases"} XCFLAGS=${XCFLAGS:-"-DPROTOTYPE"} FOPTIM=${FOPTIM:-"-O1"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lXt -lSM -lX11 -lICE -ldnet_stub"} # don't yet know if this is enough... if test "$shared_lib" = yes; then SHARE_LIB=${SHARE_LIB:-'ld -shared -o libccp4.so -expect_unresolved \* -all libccp4.a'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.so $(libdir)/libccp4.so' XCFLAGS="$XCFLAGS -Wl,-rpath,$CLIB" XFFLAGS="$XFFLAGS -Wl,-rpath,$CLIB" fi ;; # OSF1\ V5*) # This is based on the V3/4 entry # I don't know whether -assume dummy_aliases is supported/needed in # earlier versions... # -D__V40_OBJ_COMPAT -nointrinsics required for V5 executables to run # under 4.0, but this should be done locally via DEC_CC or comp.config # if required. Note that the compiler (or dtk) for which these flags # are relevant, may also be used under 4.0 and 5.0. XFFLAGS=${XFFLAGS:-"-fpe0 -assume dummy_aliases"} XCFLAGS=${XCFLAGS:-"-DPROTOTYPE"} FOPTIM=${FOPTIM:-"-O1"} # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lXt -lSM -lX11 -lICE -ldnet_stub"} if test "$shared_lib" = yes; then SHARE_LIB=${SHARE_LIB:-'ld -shared -o libccp4.so -expect_unresolved \* -all libccp4.a'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.so $(libdir)/libccp4.so' XCFLAGS="$XCFLAGS -Wl,-rpath,$CLIB" XFFLAGS="$XFFLAGS -Wl,-rpath,$CLIB" fi ;; OSF1*) ;; *) echo "! This doesn't appear to be an OSF/1 system. You should run configure on a machine of the correct type." exit 1 ;; esac test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} M4=${M4:-"m4 -D_dec_fortran=1"} FOPTIM=${FOPTIM:-"-O1"} XFFLAGS=${XFFLAGS:-"-fpe0"} # & core dump on overflow, /0 and invalid XCFLAGS=${XCFLAGS:-"-DPROTOTYPE"} INSTALL_PROGRAM=${INSTALL_PROGRAM:-"/usr/bin/installbsd -c -o $user"} INSTALL_DATA=${INSTALL_DATA:-"/usr/bin/installbsd -m 644 -c -o $user"} # Test to see if warnings should not be suppressed if test ! "$warnings" = yes; then XFFLAGS="-nowarn $XFFLAGS" XCFLAGS="-w $XCFLAGS" fi # Test to see if non_shared is specified if test "$non_shared" = yes; then XFFLAGS="-non_shared $XFFLAGS" XCFLAGS="-non_shared $XCFLAGS" SETFLAGS=${SETFLAGS:-"amore_FLAGS='-non_shared -O0' \ rsps_FLAGS='-non_shared -O1 -Olimit 3000' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C -static' "} else SETFLAGS=${SETFLAGS:-"amore_FLAGS='-O0' \ rsps_FLAGS='-O1 -Olimit 3000' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C -static' "} fi # Xwindows variables set if wanted or not! XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-lX11 -lXt"} XTYPE=${XTYPE:-"DECALPHAOSF"} # Set Mapslicer command library flags # Try using same flags for all OSF1 versions MAPSLICER_LIBS=${MAPSLICER_LIBS:-"-lfor -lUfor"} MAPSLICER_SHARE=${MAPSLICER_SHARE:-"ld -shared -o libccp4map.so -expect_unresolved \* -all libccp4map.a"} # echo; echo "! Beware -- the $system installation is not fully tested." ;; linux_compaq_compilers) # Thanks to Sanjoy Ray and David van der Spoel for this. # Apparently compaq now distribute a set of compilers for linux # this conifure was hacked together by Sanjoy Ray from the # OSF1 option. echo "! This is a new option and is relativeley untested!" echo "! November 1999" case `uname -sr` in Linux*) ;; *) echo "! This doesn't appear to be a Linux system. You should run" echo "! configure on a machine of the correct type." exit 1 ;; esac case `grep Alpha /proc/cpuinfo` in *Alpha*) ;; *) echo "! This doesn't appear to be an Alpha system. You should run" echo "! configure on a machine of the correct type." exit 1 ;; esac case `which fort` in *fort) ;; *) echo "! You don't appear to have the Compaq Fortran compiler (fort). " echo "! Either configure for Linux, or install fort." echo "! See http://www.unix.digital.com/linux/software.htm" exit 1 ;; esac case `which ccc` in *ccc) ;; *) echo "! You don't appear to have the Compaq C compiler (ccc). " echo "! Either configure for Linux, or install ccc." echo "! See http://www.unix.digital.com/linux/software.htm" exit 1 ;; esac FC=${FC:-fort} CC=${CC:-ccc} M4=${M4:-"m4 -D_dec_fortran=1"} FOPTIM=${FOPTIM:-"-O1"} XFFLAGS=${XFFLAGS:-"-fpe0 -assume dummy_aliases -assume no2underscores -nowarn"} XCFLAGS=${XCFLAGS:-"-w -DPROTOTYPE -D__OSF1__"} INSTALL_DATA=${INSTALL_DATA:-"cp"} INSTALL_PROGRAM=${INSTALL_PROGRAM:-"cp"} SETFLAGS=${SETFLAGS:-"amore_FLAGS='-O0' rsps_FLAGS='-O2' \ sftools_FLAGS='$XFFLAGS $FOPTIM' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -C -static' "} XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-L/usr/X11R6/lib -lXt -lSM -lX11 -lICE"} XTYPE=${XTYPE:-"LINUX"} TIDY=${TIDY:-"rm -f sta*"} ;; linux) case `uname -sr` in Linux*) ;; *) echo "! This doesn't appear to be a Linux system. You should run" echo "! configure on a machine of the correct type." exit 1 ;; esac test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} test "$with_f2c" && XCFLAGS=${XCFLAGS:-"-DPROTOTYPE"} test ! "$with_f2c" && M4=${M4-"m4 -D_g77=1"} test ! "$with_f2c" && XCFLAGS=${XCFLAGS:-"-DG77 -DPROTOTYPE -DHAVE_G2C_H"} #Test if gcc/g77 version 3 installed with a funny name (Redhat 7.2) #If gcc 3 found then set gcc to gcc3 or whatever UNLESS CC or FC already assigned if [ "X$FC" = "X" ] || [ "X$CC" = "X" ]; then echo " " echo "configure will attempt to find gcc and g77 version 3" case `which gcc3 2>/dev/null` in *gcc3 ) CC=${CC:-"gcc3"} ;; esac case `which gcc-3` in *gcc-3 ) CC=${CC:-"gcc-3"} ;; esac case `which g773` in *g773 ) FC=${FC:-"g773"} ;; esac case `which g77-3` in *g77-3 ) FC=${FC:-"g77-3"} ;; esac fi FC=${FC:-g77} CC=${CC:-gcc} case `$CC -v 2>&1` in *Red\ Hat\ Linux\ 7.0* ) # This is really on redhat 7.0 with only origional compilers - will work with -O0 XFFLAGS=${XFFLAGS:-"-fno-second-underscore -fno-globals -fno-automatic -O0"} ;; *2.96* ) XFFLAGS=${XFFLAGS:-"-fno-second-underscore -fno-globals -fno-automatic"} ;; *3.* ) XFFLAGS=${XFFLAGS:-"-fno-second-underscore -fno-globals -fno-automatic"} ;; esac # Michael Wahl says this is sometimes needed: may need to be removed. XFFLAGS=${XFFLAGS:-"-fno-second-underscore -fno-globals"} # Test to see if warnings should not be suppressed if test ! "$warnings" = yes; then XFFLAGS="-w $XFFLAGS" XCFLAGS="-w $XCFLAGS" fi FOPTIM=${FOPTIM:-"-O"} COPTIM=${COPTIM:-"-O"} INSTALL_DATA=${INSTALL_DATA:-"cp"} INSTALL_PROGRAM=${INSTALL_PROGRAM:-"cp"} SETFLAGS=${SETFLAGS:-"sftools_FLAGS='$XFFLAGS $FOPTIM' \ refmac_FLAGS='$XFFLAGS -O0' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -fforce-mem'"} XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-L/usr/X11R6/lib -lXt -lSM -lX11 -lICE"} XTYPE=${XTYPE:-"LINUX"} if test "$shared_lib" = yes; then SHARE_LIB=${SHARE_LIB:-'ld -shared -soname libccp4.so --whole-archive -o libccp4.so libccp4.a'} SHARE_INST='$(INSTALL_DATA) `pwd`/libccp4.so $(libdir)/libccp4.so' XLDFLAGS=${XLDFLAGS:-"-Wl,-rpath,$CLIB"} fi # Set Mapslicer command library flags # For g77 Fortran run-time library is gc2 MAPSLICER_LIBS=${MAPSLICER_LIBS:-"-lg2c -ldl"} # Cannot figure out the options for building shared at the moment so # don't bother ##MAPSLICER_SHARE=${MAPSLICER_SHARE:-"ld -shared -soname libccp4map.so --whole-archive -o libccp4map.so libccp4map.a"} MAPSLICER_SHARE=${MAPSLICER_SHARE:-""} ;; Darwin) test "$with_f2c" && M4="m4 -D_f2c=1" test "$with_f2c" && XCFLAGS=${XCFLAGS:-"-DPROTOTYPE"} test ! "$with_f2c" && M4="m4 -D_g77=1" test ! "$with_f2c" && XCFLAGS=${XCFLAGS:-"-DG77 -DPROTOTYPE -DHAVE_G2C_H"} FC=${FC:-g77} CC=${CC:-cc} XFFLAGS=${XFFLAGS:-"-funroll-loops -ffast-math -fno-second-underscore -fno-globals -fno-automatic"} FOPTIM=${FOPTIM:-"-O2"} COPTIM=${COPTIM:-"-O"} INSTALL_DATA=${INSTALL_DATA:-"cp"} INSTALL_PROGRAM=${INSTALL_PROGRAM:-"cp"} SETFLAGS=${SETFLAGS:-"sftools_FLAGS='$XFFLAGS $FOPTIM' \ refmac_FLAGS='$XFFLAGS -O0' \ arp_waters_FLAGS='$XFFLAGS $FOPTIM -fforce-mem' \ xdlmapman_FLAGS='$XFFLAGS -O1' "} XDL_LIB=${XDL_LIB:-"-L${CCP4_LIB} -lxdl_view"} XWIN_LIB=${XWIN_LIB:-"-L/usr/X11R6/lib -lXt -lSM -lX11 -lICE"} XTYPE=${XTYPE:-"LINUX"} TIDY=${TIDY:-"rm -f sta*"} MAPSLICER_LIBS=${MAPSLICER_LIBS:-"-lg2c -ldl"} MAPSLICER_SHARE=${MAPSLICER_SHARE:-""} ;; gnu_win32) if test -n "$with_x"; then echo "! Xwindows installation has not been tested !" echo "! for this system and so will not be attempted.!" with_x= fi case `uname -sr` in CYGWIN32_*) echo; echo "! You will need the fsplit utility" echo; echo "*************************************************************" echo " ! Sorry but you MUST also do a minor change to \$CPROG/Makefile and" echo " ! (to be safe) \$CPROG/Makefile.in." echo " ! sfcheck will not compile with the object sfch_unix and so all" echo " ! cases of sfch_unix.o or sfch_unix.f must be replaced with " echo " ! sfch_linux.o or sfch_linux.f prior to makeing the suite." echo " ! This will eventually be automated!"; echo ;; *) echo "! This doesn't appear to be a gnu32 system. You should run" echo "! configure on a machine of the correct type." exit 1 ;; esac test "$with_f2c" && M4=${M4:-"m4 -D_f2c=1"} test "$with_f2c" && XCFLAGS=${XCFLAGS:-"-DPROTOTYPE"} test ! "$with_f2c" && M4=${M4-"m4 -D_g77=1"} test ! "$with_f2c" && XCFLAGS=${XCFLAGS:-"-DG77 -D_WIN32 -DPROTOTYPE"} FC=${FC:-g77} CC=${CC:-gcc} # Michael Wahl says this is sometimes needed: may need to be removed. XFFLAGS=${XFFLAGS:-"-fno-second-underscore"} FOPTIM=${FOPTIM:-"-O"} COPTIM=${COPTIM:-"-O"} INSTALL_DATA=${INSTALL_DATA:-"cp"} INSTALL_PROGRAM=${INSTALL_PROGRAM:-"cp"} SETFLAGS=${SETFLAGS:-"sftools_FLAGS='$XFFLAGS $FOPTIM'"} ;; freebsd) if test -n "$with_x"; then echo "! Xwindows installation has not been tested !" echo "! for this system and so will not be attempted.!" with_x= fi case `uname -sr` in FreeBSD*) echo; echo "! Beware -- the $system installation is not tested.";; *) echo "! This doesn't appear to be a FreeBSD system. You should run configure on a machine of the correct type." exit 1 ;; esac XFFLAGS=${XFFLAGS:-'-Nx400'}; FOPTIM=${FOPTIM:-"-O"}; with_f2c=1; SETFLAGS=${SETFLAGS:-""} ;; generic) ;; # just the defaults (library.c will barf) esac ### defaults for the variables if not set above: RANLIB=${RANLIB:-ranlib} # ranlib for libraries -- Berzerkeley has it, # SysVile doesn't use it FC=${FC:-f77} # fortran compiler # some of the extra configures check F77 not FC F77=${F77:-"$FC"} # XFFLAGS (special fortran flags) null by default CC=${CC:-cc} # C compiler XCFLAGS=${XCFLAGS:-""} # special C flags FOPTIM=${FOPTIM:-""} # Fortran optimisation flag COPTIM=${COPTIM:-"-O"} # C optimisation flag LNS=${LNS:-"ln -s"} # make symbolic link or copy if system # doesn't have symbolic links, because can't hard link across # file systems [fixme: configure could test ability to hard # link from $srcdir to . ] # how to run m4 to preprocess unix.m4 # The BSD4.2 m4 doesn't allow any command-line flags. With it # `pre-defines' will have to be specified in an extra file and sync # lines can't be inserted. Actually, sync lines probably lose for # various reasons, so don't use them. Where there's a choice you # probably want the SysVile m4. if test -z "$M4"; then if test "$with_f2c"; then M4="m4 -D_f2c=1" else M4=m4 fi else true fi MAKE=${MAKE:-make} # We need the variable MAKE for recursion in # the makefiles and some makes don't set it. Setting it with # configure prevents using e.g., gmake, pmake at different # times F=${F:-f} # extension for fortran files (now always .f) test "$with_f2c" && test "$hush" != 1 && XCFLAGS="$XCFLAGS -DF2C" || true # XLDFLAGS (extra load flags e.g., for libraries) null by default # SETFLAGS defines individual FCFLAGS for some targets which need # special treatment, probably through optimiser problems and is # normally null. If program foo needs flags -bar and -baz, define # SETFLAGS="foo_FLAGS=-bar\ -baz". To express null flags use use # foo_FLAGS=' '. # n.b. amore has horrible data-aliasing problems -- always turn off optimistion # in the hope they won't bite... # Actually, -O0 isnt always valid... #SETFLAGS=${SETFLAGS:-"amore_FLAGS=$XCFLAGS\ $LDFLAGS\ -O0"} INSTALL_PROGRAM=${INSTALL_PROGRAM:-"cp"} # command to install executables -- # use BSD install if available, to # avoid chaos with running programs INSTALL_DATA=${INSTALL_DATA:-"cp"} # install for non-executables -- BSD install # with appropriate -m if available test -z "$MAKE" || MAKELINE="MAKE = $MAKE" test "$shared_lib" = yes && test -z "$SHARE_LIB" && echo "! --with-shared-lib not supported for $system" || true if test "$shared_lib" = yes; then case $system in # fixme: I think this is wrong and was corrected previously. # LD_LIBRARY_PATH probably works -- needs checking. # osf1) test -z "$_RLD_LIST" && # echo; echo "! Set _RLD_LIST to use the shared library"; echo; ;; *) test -z "$LD_LIBRARY_PATH" && ( echo; echo "! Set LD_LIBRARY_PATH to use the shared library"; echo; ) ;; esac else true fi # some setting up for xwindows - or not if test "$with_x" = yes; then DIRS=". $src $unsupp $xwindir $rotgendir \ lib/src lib/data" /bin/cp $xwindir/XCCPJIFFY/Imakefile $xwindir/XCCPJIFFY/Imakefile.bak echo "#define $XTYPE" > $xwindir/XCCPJIFFY/Imakefile echo "PLOT_COMMAND = " $PLOT_COMMAND >> $xwindir/XCCPJIFFY/Imakefile echo "PRINT_COMMAND = " $PRINT_COMMAND >> $xwindir/XCCPJIFFY/Imakefile cat $xwindir/XCCPJIFFY/Imakefile.in >> $xwindir/XCCPJIFFY/Imakefile else if test -f x-windows/Makefile; then /bin/mv x-windows/Makefile x-windows/Makefile.old echo echo "* an old x-windows/Makefile has been moved to " echo "* x-windows/Makefile.old for safe keeping!" else true fi DIRS=". $src $unsupp lib/src lib/data" fi ### Set CCIF variables, and run separate configure unless disabled if test "$disable_ccif" = yes; then # disable CCIF stuff ccifdir= XCIF_LIB= CIFLIBTARGETS= CIFLIBOBJS= CIFTARGETS= if test ! -f $srcdir/lib/src/harv_orig.f; then /bin/mv $srcdir/lib/src/harvlib.f $srcdir/lib/src/harv_orig.f; else true; fi /bin/cp $srcdir/lib/src/harv_dummy.f $srcdir/lib/src/harvlib.f else # run configure for CCIF library ccifdir=lib/ccif XCIF_LIB="-L$srcdir/lib/ccif -lccif" CIFLIBTARGETS=cciflib CIFLIBOBJS="\$L(cciflib.o)" CIFTARGETS=cif2mtz if test -f $srcdir/lib/src/harv_orig.f; then /bin/cp $srcdir/lib/src/harv_orig.f $srcdir/lib/src/harvlib.f; else true; fi CFLAGS="${COPTIM} ${XCFLAGS}" FFLAGS="${FOPTIM} ${XFFLAGS}" if test "$CC" = gcc && test "$shared_lib" = yes; then CFLAGS="${COPTIM} ${XCFLAGS} -fPIC" FFLAGS="${FOPTIM} ${XFFLAGS} -fPIC" fi export CFLAGS FFLAGS SHARED_LIB_FLAGS if test "$shared_lib" = yes; then xopts="--enable-shared=yes" else xopts="--enable-shared=no" fi if test "$with_rxdispencer" = yes; then echo echo "Running separate configure for rxdispencer." echo MAKE=${MAKE:-make} cd lib/rxdispencer if [ "X$LIBFOPTIM" != "X" ]; then FOPTIM_save=$FOPTIM FOPTIM=$LIBFOPTIM FFLAGS="${FOPTIM} ${XFFLAGS}" fi if [ "X$LIBCOPTIM" != "X" ]; then COPTIM_save=$COPTIM COPTIM=$LIBCOPTIM CFLAGS="${COPTIM} ${XCFLAGS}" fi ./configure --srcdir=${srcdir}/lib/rxdispencer if [ "X$LIBFOPTIM" != "X" ]; then FOPTIM=$FOPTIM_save FFLAGS="${FOPTIM} ${XFFLAGS}" fi if [ "X$LIBCOPTIM" != "X" ]; then COPTIM=$COPTIM_save CFLAGS="${COPTIM} ${XCFLAGS}" fi $MAKE cd ../.. RX_H="$srcdir/lib/rxdispencer/rx" RX_L="$configdir/lib/rxdispencer/rx" export RX_H RX_L fi echo echo "Running separate configure for CCIF library." echo cd lib/ccif if [ "X$LIBFOPTIM" != "X" ]; then FOPTIM_save=$FOPTIM FOPTIM=$LIBFOPTIM FFLAGS="${FOPTIM} ${XFFLAGS}" fi if [ "X$LIBCOPTIM" != "X" ]; then COPTIM_save=$COPTIM COPTIM=$LIBCOPTIM CFLAGS="${COPTIM} ${XCFLAGS}" fi ( touch /tmp/$$.cache_file 2>/dev/null && \ cat /dev/null > /tmp/$$.cache_file && \ ./configure $xopts --libdir=${libdir} --srcdir=${srcdir}/lib/ccif --cache-file=/tmp/$$.cache_file ) || \ ./configure $xopts --libdir=${libdir} --srcdir=${srcdir}/lib/ccif rm -f /tmp/$$.cache_file if [ "X$LIBFOPTIM" != "X" ]; then FOPTIM=$FOPTIM_save FFLAGS="${FOPTIM} ${XFFLAGS}" fi if [ "X$LIBCOPTIM" != "X" ]; then COPTIM=$COPTIM_save CFLAGS="${COPTIM} ${XCFLAGS}" fi cd ../.. echo echo "Returning to main configure." echo fi ### Set variables for LAPACK build, and run configure if enabled if test "$disable_lapack" = yes; then # disable BLAS and LAPACK lapackdir= XLAPACK_LIB= else # configure to use LAPACK and BLAS functions echo echo "********* BLAS AND LAPACK CONFIGURATION ***********" echo echo "Warning: this option has not been extensively tested!" echo "Please report problems to ccp4@ccp4.ac.uk" # Search for vendor LAPACK/BLAS first if test ! "$with_netlib_lapack" ; then # Initialise variables to blank lapackdir= XLAPACK_LIB= # Possible directories to check for vendor or pre-existing LAPACK or # BLAS - add to these if you want to test others trydirs="/lib /usr/lib /usr/local/lib" # Possible library names # These are the names like xxxx where the library will be libxxxx.a # or libxxxx.so echo echo "Guessing names for native/vendor LAPACK and/or BLAS libraries" echo "on this system" case $system in osf1) # OSF1 has dxml (old version) and cxml # which should have both lapack and blas trylapack="dxml cxml" tryblas= trydirs="${trydirs} /usr/shlib" ;; irix) # Additional search paths for IRIX trydirs="${trydirs} /usr/lib32" # SCSL should have both LAPACK and BLAS trylapack="scs" tryblas="blas" ;; irix64) # Additional search paths for IRIX64 trydirs="${trydirs} /usr/lib64" # SCSL should have both LAPACK and BLAS trylapack="scs" tryblas="blas" # Extra compiler flags? #XLAPACKFLAGS="-OPT:IEEE_NaN_inf=ON" ;; hpux) # Additional search paths for HPUX trydirs="${trydirs} /opt/fortran/lib /opt/fortran/lib/pa2.0 /opt/mlib/lib/pa2.0" # HPUX should have both LAPACK (part of mlib) and BLAS trylapack="lapack" tryblas="blas" # Extra compiler flags? # +U77 required for ETIME function - this is already in XFFLAGS #XLAPACKFLAGS="+U77" ;; sunos) # Sun has libraries with BLAS and LAPACK invoked using -xlic_lib=sunperf echo "SunOs can use the Sun Performance Library (if installed)" echo "which has both BLAS and LAPACK 3.0" echo # This is a special case so try running a test compile echo "Checking: try to link library against test program" if test -f testlink.f || test -f testlink ; then rm -f testlink* fi cat > testlink.f <&1; } && test -s testlink ; then # Compilation was okay echo "... -xlic_lib=sunperf is okay" XLAPACK_LIB="-xlic_lib=sunperf" # Set the next two variables so that configure # doesn't try to build netlib libraries LAPACKLIB="sun_perf" noblas=yes else # Compilation failed echo "... cannot use -xlic_lib=sunperf" echo echo "This may be because the Sun Performance Library is not" echo "installed on your system" echo "Contact your system adminstrator or Sun vendor" fi trylapack= tryblas= ;; *) echo "The guesses for this system may not be correct - please" echo "e-mail ccp4@ccp4.ac.uk if you have any extra information" echo # Default guess is just libblas trylapack="lapack" tryblas="blas" ;; esac # # Search for LAPACK libraries # # Write out what the guesses are if test "$trylapack" ; then echo "Possible LAPACK library names for this system:" for libname in $trylapack do echo " lib$libname" done # Possible library name extensions tryexts="a so dylib" # Now loop over all the possibilities and see if anything # turns up echo echo "Searching for libraries with LAPACK and BLAS:" for testdir in $trydirs do for testlib in $trylapack do for ext in $tryexts do if test ! "$LAPACKLIB"; then if test -s "$testdir/lib$testlib.$ext" ; then echo "...found LAPACK library: $testdir/lib$testlib.$ext" # Now try and link to a test program # This is really for IRIX where libraries can be # o32 or n32 echo " Testing: try to link library against test program" if test -f testlink.f || test -f testlink ; then rm -f testlink* fi cat > testlink.f <&1; } && test -s testlink ; then # This one is okay LAPACKLIB="$testlib" LAPACKDIR="$testdir" echo "Link ok - using lib$LAPACKLIB from $LAPACKDIR" # XLAPACK_LIB="-L$LAPACKDIR -l$LAPACKLIB" # # Test to see if we need BLAS too # Do this by trying to compile a test program # Use the LSAME test for now echo echo " * Checking whether we need a separate BLAS library *" echo " Testing: try linking library against test program" cd lib/lapack/test if test -f testlsame ; then rm -f testsame testlsame.o fi test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB" echo $test_compile if { ( eval $test_compile) 2>&1;} && test -s testlsame ; then echo "Test program okay - additional separate BLAS not required" noblas=yes else echo "Test program failed - need a separate BLAS library" fi cd ../../.. else # Keep looking echo " link failed - cannot use lib$testlib" fi fi fi done done if test ! "$LAPACKLIB"; then echo "...nothing in $testdir" fi done fi # If LAPACKLIB hasn't been set at this point then no LAPACK library # was found if test ! "$LAPACKLIB" ; then echo echo "No pre-existing LAPACK library found - NetLib LAPACK will be built instead" make_lapack=lapacklib fi # Look for possible BLAS if test ! "$noblas" ; then if test "$tryblas" ; then echo echo "Possible BLAS library names for this system:" for libname in $tryblas do echo " lib$libname" done # Possible library name extensions tryexts="a so" # Now loop over all the possibilities and see if anything # turns up echo echo "Searching for libraries with BLAS:" for testdir in $trydirs do for testlib in $tryblas do for ext in $tryexts do if test ! "$BLASLIB"; then if test -s "$testdir/lib$testlib.$ext" ; then echo "...found BLAS library: $testdir/lib$testlib.$ext" # Now try and link to a test program # This is really for IRIX where libraries can be # o32 or n32 echo " Testing: try to link library against test program" if test -f testlink.f || test -f testlink ; then rm -f testlink* fi cat > testlink.f <&1;} && test -s testlink ; then # This one is okay BLASLIB="$testlib" BLASDIR="$testdir" BLASEXT="$ext" echo "Link ok - using lib$BLASLIB from $BLASDIR" XLAPACK_LIB="$XLAPACK_LIB -L$BLASDIR -l$BLASLIB" else # Keep looking echo " link failed - cannot use lib$testlib" fi fi fi done done if test ! "$BLASLIB"; then echo "...nothing in $testdir" fi done fi # Do we need to build BLAS too? if test ! "$BLASLIB" ; then echo echo "No pre-existing BLAS library was found - NetLib BLAS will be built instead" echo "This may result in poorer performance of the LAPACK routines" make_blas=blaslib BLASLIB=blas BLASDIR="$CCP4_LIB/lapack" BLASEXT="a" fi fi # Otherwise force building of NetLib BLAS and LAPACK libs else echo echo "! Force building of NetLib BLAS and LAPACK..." make_blas=blaslib make_lapack=lapacklib BLASLIB=blas BLASDIR="$CCP4_LIB/lapack" BLASEXT="a" fi # # Generate makefiles if (test -n "$make_lapack" || test -n "$make_blas") ; then # If building LAPACK then get the right version of ilaenv # for the IEEE compliance (or otherwise) of this system # Maybe this needs to be set in the main body of configure? case $system in osf1) # OSF1 is non-IEEE-754 compliant (at least for V4.0) non_ieee="yes" ;; *) # In the absence of information to the contrary assume # that all other systems are IEEE-compliant non_ieee="no" ;; esac if test "$non_ieee" = yes; then echo echo "Assuming this system is not IEEE-754 compliant for Nan and infinity" echo "arithmetic" echo "Using the modified version of ILAENV appropriate for such a system" cp -f lib/lapack/src/ilaenv-non-ieee.f lib/lapack/src/ilaenv.f else echo echo "Assuming this system is IEEE-754 compliant for Nan and infinity arithmetic" echo "Using the default version of ILAENV" cp -f lib/lapack/src/ilaenv-dist.f lib/lapack/src/ilaenv.f fi # No options for shared libraries yet if test "$shared_lib" = yes; then echo echo "! Sorry... cannot configure make to build shared BLAS or" echo "! LAPACK libraries at present" fi # # Create the Makefile header for the LAPACK build cd lib/lapack echo echo "Creating make.inc header file for BLAS and/or LAPACK Makefiles..." if [ "X$LIBFOPTIM" != "X" ]; then FOPTIM_save=$FOPTIM FOPTIM=$LIBFOPTIM FFLAGS="${FOPTIM} ${XFFLAGS}" fi cat > make.inc < Makefile cd ../.. echo echo "Created lib/blas/src/Makefile for BLAS compilation" else # Check that lsame and xerbla are available in BLAS # This is to prevent duplication of routines when building # Netlib versions, which can cause problems when linking CCP4_LAPACKAUX= if test "$make_lapack" = lapacklib; then cd test echo echo "Checking for LSAME in lib$BLASLIB" if test -f testlsame ; then rm -f testsame testlsame.o fi test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$BLASDIR -l$BLASLIB" echo $test_compile if { ( eval $test_compile) 2>&1;} && test -s testlsame ; then echo "Found LSAME in lib$BLASLIB" else echo "LSAME not found: adding lsame.o to list of targets in LAPACK build" CCP4_LAPACKAUX="$CCP4_LAPACKAUX lsame.o" fi echo echo "Checking for XERBLA in lib$BLASLIB" if test -f testxerbla ; then rm -f testxerbla testxerbla.o fi test_compile="$FC $FOPTIM $XFFLAGS -o testxerbla xerblatst.f -L$BLASDIR -l$BLASLIB" echo $test_compile if { ( eval $test_compile) 2>&1;} && test -s testxerbla ; then # Found lsame echo "Found XERBLA in lib$BLASLIB" else echo "XERBLA not found: adding xerbla.o to list of targets in LAPACK build" CCP4_LAPACKAUX="$CCP4_LAPACKAUX xerbla.o" fi cd .. fi cat >> make.inc < Makefile cd .. echo echo "Created src/Makefile for LAPACK compilation" fi # Top level Makefile cat make.inc Makefile.in > Makefile echo echo "Created top-level LAPACK Makefile" echo "Only the single (real) precision, double precision, and complex" echo "precision routines will be built." cd ../.. # lapackdir=lib/lapack XLAPACK_LIB="-L$srcdir/lib/lapack -llapack -L$BLASDIR -l$BLASLIB" fi # Clean up if test -f testlink.f || test -f testlink ; then rm -f testlink* fi echo echo "Linking in LAPACK/BLAS using XLAPACK_LIB=\"${XLAPACK_LIB}\"" echo echo "***** BLAS AND LAPACK CONFIGURATION FINISHED *******" if [ "X$LIBFOPTIM" != "X" ]; then FOPTIM=$FOPTIM_save FFLAGS="${FOPTIM} ${XFFLAGS}" fi fi ### Set variables for Mapslicer command library build if test "$disable_mapslicer" = yes; then # disable Mapslicer build mapslicerdir= else # configure for build of Mapslicer command library etc echo echo "********* MAPSLICER CONFIGURATION ***********" echo # Check that it is still possible to build something if test ! "$MAPSLICER_LIBS" ; then echo "Configure has been unable to set up a build for the MapSlicer" echo "command library on this system, since we do not know the names" echo "of the Fortran libraries." echo "Please contact ccp4@ccp4.ac.uk if you can supply this information." mapslicerdir= else echo "Warning: this option has not been extensively tested!" echo "Please report problems to ccp4@ccp4.ac.uk" MAPSLICER_TARGETS= # # Try to find a valid tcl.h file tryincs="$CCP4I_TCLTK/../include /usr/include /usr/local/include" echo echo "Searching for a useable tcl.h header file..." for testinc in $tryincs do if test ! "$TCL_INCDIR" && test -f "$testinc/tcl.h" ; then echo "...found tcl.h in $testinc" # Need to check version - must be 8.0 or better versionline=`eval grep TCL_MAJOR_VERSION $testinc/tcl.h` version=`echo $versionline | sed 's/#define TCL_MAJOR_VERSION //'` if test $version -ge 8 ; then echo " TCL major version is $version - OK" TCL_INCDIR="$testinc" else echo " TCL major version is only $version ... too old" fi fi done if test ! "$TCL_INCDIR" ; then echo echo "*** Can't find a version of tcl.h which is at least 8.0" echo "*** This means the MapSlicer command library cannot be built" # Disable build of mapslicer command library mapslicerdir= else if test "$MAPSLICER_SHARE" ; then echo echo "Configured to build the command library as a loadable package" echo MAPSLICER_TARGETS="$MAPSLICER_TARGETS libccp4map.so" fi # Configure to build the custom interpreter # This is not essential as long as we can build the shared # library # First try to find TCL and Tk libraries echo "Searching for useable Tcl and Tk libraries..." # Possible directories trydirs="$CCP4I_TCLTK/../lib /usr/lib /usr/local/lib" # Possible library extensions tryexts="a so dylib" # Possible library version numbers tryvers="8.3 8.2 8.1 8.0" # Look for Tcl library of the form libtcl[version].[ext] # Similarly for Tk for testdir in $trydirs do # ... and possible versions for tcl ... for testvers in $tryvers do # ... and possible extensions (.a or .so) for testext in $tryexts do if test ! "$TCLDIR" ; then if test -s "$testdir/libtcl$testvers.$testext" ; then echo "...found TCL library: $testdir/libtcl$testvers.$testext" TCLLIB="tcl$testvers" TCLDIR="-L$testdir" fi fi done # ... and possible extensions for tk for testext in $tryexts do if test ! "$TKDIR" ; then if test -s "$testdir/libtk$testvers.$testext" ; then echo "...found TK library: $testdir/libtk$testvers.$testext" TKLIB="tk$testvers" TKDIR="-L$testdir" fi fi done done done # Check if libraries were not found if test ! "$TCLDIR" || test ! "$TKDIR" || test ! "XWIN_LIB" ; then echo "*** Can't find useable versions of the Tcl and/or Tk and/or X window" echo "*** libraries!" echo "*** This means the MapSlicer standalone interpreter cannot be built" else echo echo "Configured to build the command library as part of a standalone" echo "interpreter" MAPSLICER_TARGETS="$MAPSLICER_TARGETS ccp4mapwish" fi fi fi # Check that there is something to build if test ! "$MAPSLICER_TARGETS" ; then echo echo "*** Cannot build the MapSlicer command library in any form!" echo "*** This means that the MapSlicer viewer will not be available" mapslicerdir= else mapslicerdir=src/ccp4mapwish_ fi DIRS="$DIRS $mapslicerdir" echo echo "***** MAPSLICER CONFIGURATION FINISHED *******" fi ### Build makefiles in the sub-directories for i in $DIRS ; do if [ "X$i" = "Xlib/src" ]; then if [ "X$LIBFOPTIM" != "X" ]; then FOPTIM_save=$FOPTIM FOPTIM=$LIBFOPTIM FFLAGS="${FOPTIM} ${XFFLAGS}" fi if [ "X$LIBCOPTIM" != "X" ]; then COPTIM_save=$COPTIM COPTIM=$LIBCOPTIM CFLAGS="${COPTIM} ${XCFLAGS}" fi fi # this section checks to see if the compiler is gcc, you are dooing shared libs # and you are currently creating lib/src/Makefile. otherwise will skip if test $i = lib/src && test "$CC" = gcc && test "$shared_lib" = yes; then XFFLAGS=$XFFLAGS" -fPIC" XCFLAGS=$XCFLAGS" -fPIC" fi if test $i = lib/src && test $system = HP-UX && test "$shared_lib" = yes; then XFFLAGS=$XFFLAGS" +z" XCFLAGS=$XCFLAGS" +z" fi cat >$i/Makefile <>$i/Makefile <>$i/Makefile <>$i/Makefile done if test "$with_x" = yes; then # run configure for xdlview library CFLAGS="${COPTIM} ${XCFLAGS}" FFLAGS="${FOPTIM} ${XFFLAGS}" export CFLAGS FFLAGS SHARED_LIB_FLAGS if test "$shared_lib" = yes; then xopts="--enable-shared=yes" else xopts="--enable-shared=no" fi echo echo "Running separate configure for xdlview library." echo cd x-windows/xdl_view/src # It is important for some systems that the files # configure.in, Makefile.am, aclocal.m4, configure, # and Makefile.in have the correct timestamp relative # to each other (Clemens Vonrhein) echo "Updating modification times for configuration files" echo "Please wait..." for i in configure.in Makefile.am aclocal.m4 configure Makefile.in ltconfig ltmain.sh; do touch $i && sleep 1 done echo "...done." echo echo "configure $xopts --libdir=${libdir}" ./configure $xopts --libdir=${libdir} echo cd ../../libjwc/libjwc_c echo "Running separate configure for libjwc_c lib" echo "configure $xopts --libdir=${libdir}" ( touch /tmp/$$.cache_file 2>/dev/null && \ cat /dev/null > /tmp/$$.cache_file && \ ./configure $xopts --libdir=${libdir} --cache-file=/tmp/$$.cache_file ) || \ ./configure $xopts --libdir=${libdir} rm -f /tmp/$$.cache_file echo cd ../libjwc_f echo "Running separate configure for libjwc_f lib" echo "configure $xopts --libdir=${libdir}" ( touch /tmp/$$.cache_file 2>/dev/null && \ cat /dev/null > /tmp/$$.cache_file && \ ./configure $xopts --libdir=${libdir} --cache-file=/tmp/$$.cache_file ) || \ ./configure $xopts --libdir=${libdir} rm -f /tmp/$$.cache_file # checking for compiler_o_lo yourself echo echo " *** checking for compiler_o_lo using $FC $FOPTIM $XFFLAGS ..." cat < $$.f program test write(*,*) 'Hello World!' end end_ip cat < $$.sh #!/bin/sh $FC $FOPTIM $XFFLAGS -c -o $$.lo $$.f >/dev/null 2>&1 echo $? end_ip chmod +x $$.sh if [ `./$$.sh` -ne 0 ] || [ ! -f $$.lo ]; then sed "s/^compiler_o_lo=\"yes\"$/compiler_o_lo=\"no\"/g" libtool > $$.libtool && \ mv $$.libtool libtool && \ chmod +x libtool echo " resetting compiler_o_lo to \"no\"" else sed "s/^compiler_o_lo=\"no\"$/compiler_o_lo=\"yes\"/g" libtool > $$.libtool && \ mv $$.libtool libtool && \ chmod +x libtool echo " resetting compiler_o_lo to \"yes\"" fi rm -f $$* echo cd ../../Mosflm echo "Running separate configure for ipmosflm" echo "configure $xopts --libdir=${libdir}" ./configure $xopts --libdir=${libdir} echo cd ../.. echo "Returning to main configure." echo fi # fixme: decide whether we should zap any existing libccp4.a # That's it. Record the result in config.status for possible re-use # (following the GNU convention) and give the luser some idea what we've # done... test $src || opts=" --onlylibs" test "$with_f2c" && opts=$opts" --with-f2c" || true test "$shared_lib" = yes && opts="$opts --with-shared-lib" || true test "$tmpdir" && opts="$opts --tmpdir=$tmpdir" || true test "$with_x" = yes && opts="$opts --with-x" || true test "$with_rxdispencer" = yes && opts="$opts --with-rxdispencer" || true test "$disable_ccif" = yes && opts="$opts --disable-ccif" || true test "$with_netlib_lapack" = yes && opts="$opts --with-netlib-lapack" || true test "$disable_lapack" = yes && opts="$opts --disable-lapack" || true test "$disable_mapslicer" = yes && opts="$opts --disable-mapslicer" || true test "$warnings" = yes && opts="$opts --with-warnings" || true test "$non_shared" = yes && opts="$opts --non_shared" || true cat <config.statusx #!/bin/sh # (Generated automatically by configure) # CCP4 was configured as follows: libdir="$libdir" RANLIB="$RANLIB" \\ FC="$FC" FOPTIM="$FOPTIM" \\ COPTIM="$COPTIM" XFFLAGS="$XFFLAGS" \\ XCFLAGS="$XCFLAGS" CC="$CC" \\ LNS="$LNS" M4="$M4" \\ M4FLAGS="$M4FLAGS" SETFLAGS="$SETFLAGS" \\ MAKE="$MAKE" F="$F" \\ INSTALL_PROGRAM="$INSTALL_PROGRAM" INSTALL_DATA="$INSTALL_DATA" \\ XLDFLAGS="$XLDFLAGS" SHARE_LIB="$SHARE_LIB" SHARED_LIB_FLAGS="$SHARED_LIB_FLAGS" \\ SHARE_INST="$SHARE_INST" \\ $srcdir/configure --srcdir=$srcdir --bindir=$bindir --libdir=$libdir $opts $system -hush EOF chmod a+x config.statusx echo echo "The configuration can be re-built by executing config.status :" echo # indirect as we may be executing config.status cat config.statusx mv config.statusx config.status touch Makefile # for Makefile target in itself ########## # FSPLIT ########## # The following is commented out (since even if they have a locally # available fsplit, it won't be used now) but not removed at present # for the sake of reference - pjx. # if test $system = irix; then # cat <<\+ #! You need to install the ftn_dev util stuff, which apparently isn\'t done #! by default. You should then see something like this: #! % versions long ftn_dev | grep fsplit #! f 33940 29 ftn_dev.sw.util usr/bin/fsplit #! f 51059 4 ftn_dev.man.util usr/share/catman/u_man/cat1/fsplit.z #+ # else # echo "! You can get a copy e.g. by ftp or via the Web from" # echo "! http://src.doc.ic.ac.uk/computing/systems/unix/bsd-sources/usr.bin/fsplit" # echo "! amongst other places. Also complain to your vendor!" # fi if test -f lib/src/libccp4.a; then echo echo "If the compiled library \`lib/src/libccp4.a' is from a previous release" echo "you should delete it before compiling the current version." else true fi if test -f lib/ccif/libccif.a; then echo echo "If the compiled library \`lib/ccif/libccif.a' is from a previous release" echo "you should delete it before compiling the current version." else true fi #