Improvements to configure.ac (#52)

* Add the --with-pkgconfigdir option

* Ignore more autoreconf-generated files

* Various portability improvements

Use the 2nd argument to AX_BLAS and AX_LAPACK to handle errors.  Don't
rely on $ax_blas_ok and $ax_lapack_ok having any particular value.

AC_ARG_ENABLE([x], ...) will define $enable_x to $enableval.  No need to
do this ourselves.

The default for $enable_mpi is "no", so only compare to "no".

* Add gitignore patterns for files generated by test-driver

* Add a workaround for those without pkg-config >= 0.27

* Update CHANGES
This commit is contained in:
turboencabulator
2017-03-29 16:35:22 +02:00
committed by Sylvestre Ledru
parent 9631eb8b5f
commit 0e2ed1b2f2
4 changed files with 23 additions and 26 deletions
+4
View File
@@ -6,6 +6,7 @@ aclocal.m4
autom4te.cache/
m4/libtool.m4
m4/lt*.m4
compile
configure
config.guess
config.sub
@@ -13,6 +14,7 @@ depcomp
install-sh
ltmain.sh
missing
test-driver
# Generated by `./configure`
Makefile
@@ -29,6 +31,8 @@ arpack.pc
.libs/
# Generated by `make check`
*.log
*.trs
TESTS/dnsimp
TESTS/bug_1315_double
TESTS/bug_1315_single
+1
View File
@@ -18,6 +18,7 @@ arpack-ng - 3.5.0
call
[ Kyle Guinn ]
* Portability improvements to the autotools build system.
* Let cmake guess the default installation directories. Can be
overridden by changing CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_BINDIR.
* Shared libraries built by cmake now have their SONAME set identical to
-4
View File
@@ -9,10 +9,6 @@ SUBDIRS = UTIL SRC . TESTS EXAMPLES PARPACK
EXTRA_DIST = README PARPACK_CHANGES CHANGES DOCUMENTS VISUAL_STUDIO \
detect_arpack_bug.m4 CMakeLists.txt
# Pkgconfig directory
pkgconfigdir = $(libdir)/pkgconfig
# Files to install in Pkgconfig directory
pkgconfig_DATA = arpack@LIBSUFFIX@.pc
DISTCLEANFILES = $(pkgconfig_DATA)
+18 -22
View File
@@ -12,17 +12,11 @@ AC_PROG_CC
dnl Check for BLAS libraries
sinclude(ax_blas.m4)
AX_BLAS
if test "$ax_blas_ok" = "no"; then
AC_MSG_ERROR([cannot find BLAS libraries])
fi
AX_BLAS([], [AC_MSG_ERROR([cannot find BLAS libraries])])
dnl Check for LAPACK libraries
sinclude(ax_lapack.m4)
AX_LAPACK
if test "$ax_lapack_ok" = "no"; then
AC_MSG_ERROR([cannot find LAPACK libraries])
fi
AX_LAPACK([], [AC_MSG_ERROR([cannot find LAPACK libraries])])
AC_ARG_VAR(INTERFACE64, [set to 1 to use the 64-bit integer interface (ILP64) for ARPACK, BLAS and LAPACK])
if test x"$INTERFACE64" == x"1"; then
@@ -97,20 +91,22 @@ LT_PREREQ([2.4.2])
LT_INIT([win32-dll])
dnl See if compiling parpack
AC_ARG_ENABLE(mpi,
AC_HELP_STRING([--enable-mpi],
[build parallel version of arpack with MPI]),
[enable_mpi=$enableval],
[enable_mpi=no])
if test x"$enable_mpi" != x"no"; then
AC_LANG_PUSH([Fortran 77])
AX_MPI([], AC_MSG_ERROR([could not compile a MPI test program]))
AC_LANG_POP([Fortran 77])
fi
AC_ARG_ENABLE([mpi],
[AS_HELP_STRING(
[--enable-mpi],
[build parallel version of arpack with MPI])],
[],
[AS_VAR_SET([enable_mpi], [no])])
AS_IF([test x"$enable_mpi" != x"no"], [
AC_LANG_PUSH([Fortran 77])
AX_MPI([], AC_MSG_ERROR([could not compile a MPI test program]))
AC_LANG_POP([Fortran 77])
])
AM_CONDITIONAL([MPI],[test x"$enable_mpi" = x"yes"])
AM_CONDITIONAL([BLACS],[false])
AM_CONDITIONAL([MPI], [test x"$enable_mpi" != x"no"])
AM_CONDITIONAL([BLACS], [false])
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_SUBST([pkgconfigdir], [${libdir}/pkgconfig])])
AC_CONFIG_FILES([arpack$LIBSUFFIX.pc:arpack.pc.in], [], [LIBSUFFIX="$LIBSUFFIX"])
AC_CONFIG_FILES([
@@ -130,8 +126,8 @@ AC_CONFIG_FILES([
PARPACK/SRC/BLACS/Makefile
PARPACK/UTIL/MPI/Makefile
PARPACK/UTIL/BLACS/Makefile
PARPACK/EXAMPLES/MPI/Makefile
PARPACK/TESTS/MPI/Makefile
PARPACK/EXAMPLES/MPI/Makefile
PARPACK/EXAMPLES/BLACS/Makefile
])
])
AC_OUTPUT