mirror of
https://gitlab.com/scemama/eplf
synced 2024-09-05 19:24:45 +02:00
115 lines
2.8 KiB
Plaintext
115 lines
2.8 KiB
Plaintext
# EPLF computes the Electron Pair Localization Function
|
|
# Copyright (C) 2009 Anthony SCEMAMA, CNRS
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License along
|
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
#
|
|
# Anthony Scemama
|
|
# LCPQ - IRSAMC - CNRS
|
|
# Universite Paul Sabatier
|
|
# 118, route de Narbonne
|
|
# 31062 Toulouse Cedex 4
|
|
# scemama@irsamc.ups-tlse.fr
|
|
# -*- Autoconf -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
VERSION=[`. version ; echo $VERSION`]
|
|
AC_SUBST([VERSION])
|
|
|
|
AC_REVISION([$Revision: $VERSION $])
|
|
|
|
AC_PREREQ([2.50])
|
|
|
|
AC_INIT([EPLF], [], [scemama@irsamc.ups-tlse.fr],[eplf],[http://eplf.sourceforge.net])
|
|
|
|
AC_SYS_LONG_FILE_NAMES
|
|
ROOT=`pwd`
|
|
AC_SUBST([ROOT])
|
|
|
|
AC_CONFIG_SRCDIR([src/main.irp.f])
|
|
AC_CONFIG_FILES([make.config])
|
|
AC_PREFIX_DEFAULT([./])
|
|
|
|
AC_PROG_LN_S
|
|
AC_PROG_RANLIB
|
|
AC_PROG_CC
|
|
|
|
# Test if Static zlib is present
|
|
# ------------------------------
|
|
|
|
AC_CHECK_LIB([z],[gzclose],[STATIC=1],[STATIC=0],[-static])
|
|
STATIC_LIB="../EZFIO/lib/libezfio_irp.a"
|
|
SHARED_LIB="-L../EZFIO/lib -lezfio"
|
|
|
|
# Test IRPF90
|
|
# ------------
|
|
|
|
AC_CHECK_PROG([IRPF90],[irpf90],[yes],[no])
|
|
if [[ $IRPF90 = no ]] ; then
|
|
AC_MSG_ERROR([Please install IRPF90:\nhttp://irpf90.sourceforge.net])
|
|
fi
|
|
IRPF90=`which irpf90`
|
|
|
|
# Test Fortran
|
|
# ------------
|
|
|
|
AC_LANG([Fortran])
|
|
AC_PROG_FC([mpif90 ifort gfortran],[Fortran 90])
|
|
AC_PROG_FC_C_O
|
|
AC_FC_SRCEXT([F90])
|
|
AC_FC_FREEFORM
|
|
|
|
case $FC in
|
|
mpif90*)
|
|
FCFLAGS="-O3"
|
|
IRPF90="$IRPF90 -DMPI"
|
|
;;
|
|
ifort*)
|
|
FCFLAGS="-O3 -axT -ip"
|
|
if test $STATIC == 1 ; then
|
|
FCFLAGS="$FCFLAGS -static-intel -static-libgcc -static"
|
|
fi
|
|
;;
|
|
gfortran*)
|
|
FCFLAGS="O3 -ffast-math"
|
|
if test $STATIC == 0 ; then
|
|
FCFLAGS="$FCFLAGS -static-libgcc -static"
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
AC_SUBST(IRPF90)
|
|
|
|
# Write make.config
|
|
|
|
if [[ $STATIC = 1 ]] ; then
|
|
LIB="$STATIC_LIB -lz"
|
|
else
|
|
LIB="$SHARED_LIB -lz"
|
|
AC_MSG_WARN([
|
|
=====================================================
|
|
|
|
Using shared library. Add
|
|
$ROOT/EZFIO/lib/
|
|
to the LD_LIBRARY_PATH environment variable.
|
|
|
|
=====================================================
|
|
])
|
|
fi
|
|
AC_SUBST([LIB])
|
|
|
|
AC_OUTPUT
|
|
|
|
|