1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
diff --git a/Makefile.am b/Makefile.am
index b400095..9e6d698 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,6 +16,9 @@ SUFFIXES = .H .h .C .cc .c .f .o
SUBDIRS = contrib src bin @apbs_do_tools@
+pkgconfigdir = @pkgconfigdir@
+pkgconfig_DATA = apbs.pc
+
distclean-local: clean-local
clean-local: clean-ac
diff --git a/apbs.pc.in b/apbs.pc.in
new file mode 100644
index 0000000..c177512
--- /dev/null
+++ b/apbs.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/apbs
+
+Name: apbs
+Description: apbs
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lapbsmainroutines -lapbs
+Libs.private: @LIBS@
+Cflags: -I${includedir}
diff --git a/configure.ac b/configure.ac
index 73fbe21..31a0053 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,10 @@ AM_CONFIG_HEADER(src/aaa_inc/apbscfg.h)
AC_CONFIG_AUX_DIR(config)
AC_PREFIX_DEFAULT(${HOME})
AC_CANONICAL_SYSTEM
-
+LT_INIT
+LT_LANG([Fortran 77])
+AC_F77_DUMMY_MAIN
+AC_F77_LIBRARY_LDFLAGS
dnl ##########################################################################
dnl 1. automake initialization (uncomment only if rebuilding Makefile.in's)
dnl ##########################################################################
@@ -1037,6 +1040,7 @@ else
blas_lib=${contrib_path}/blas/.libs/libapbsblas.a
fi
AC_SUBST(apbs_do_blas)
+AC_SUBST(blas_lib)
dnl # --------------------------------
dnl # HANDLE ZLIB COMPILATION
@@ -1284,6 +1288,17 @@ else
fi
AC_SUBST(apbs_build_libraries)
+# Additional arguments (and substitutions)
+# Allow the pkg-config directory to be set
+AC_ARG_WITH(pkgconfigdir,
+ AC_HELP_STRING([--with-pkgconfigdir],
+ [Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
+ [pkgconfigdir=${withval}],
+ [pkgconfigdir='${libdir}/pkgconfig'])
+
+AC_SUBST([pkgconfigdir])
+AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
+
dnl ##########################################################################
dnl 11. generate the makefiles
dnl ##########################################################################
@@ -1332,6 +1347,8 @@ AC_CONFIG_FILES([
bin/Makefile
+ apbs.pc:apbs.pc.in
+
])
AC_OUTPUT
diff --git a/src/aaa_lib/Makefile.am b/src/aaa_lib/Makefile.am
index 2c5026b..d8d0650 100644
--- a/src/aaa_lib/Makefile.am
+++ b/src/aaa_lib/Makefile.am
@@ -22,7 +22,8 @@ libdir = ${prefix}/lib
lib_LTLIBRARIES = libapbs.la
libapbs_la_SOURCES = apbs_link.c
-libapbs_la_LIBADD = ${GEN_LIBS} ${FEM_LIBS} ${MG_LIBS} ${PMGZ_LIBS} ${AQUA_LIBS} ${BLAS_LIBS}
+libapbs_la_LIBADD = ${GEN_LIBS} ${FEM_LIBS} ${MG_LIBS} ${PMGZ_LIBS} ${AQUA_LIBS} ${BLAS_LIBS} \
+ @OPENMP_LIBS@ @maloc_lib@
libapbs_la_LDFLAGS = -version-info ${APBS_VERSION}
INCLUDES = -I${top_srcdir}/src/generic -I${top_srcdir}/src/mg -I${top_srcdir}/src/fem @inc_list@
|