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
|
Added shared libraries and create .pc file
--- configure.ac
+++ configure.ac
@@ -72,7 +72,10 @@
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 ##########################################################################
@@ -1031,7 +1031,7 @@
blas_lib=${contrib_path}/blas/.libs/libapbsblas.a
fi
AC_SUBST(apbs_do_blas)
-
+AC_SUBST(blas_lib)
dnl # -----------------------
dnl # If using Portland compilers, do not compile
dnl # tools/mesh/uhbd_asc2bin.f
@@ -1258,6 +1258,17 @@
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 ##########################################################################
@@ -1305,6 +1316,8 @@
bin/Makefile
+ apbs.pc:apbs.pc.in
+
])
AC_OUTPUT
--- src/aaa_lib/Makefile.am
+++ src/aaa_lib/Makefile.am
@@ -22,7 +22,8 @@
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@
--- apbs.pc.in
+++ 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}
--- Makefile.am
+++ Makefile.am
@@ -16,6 +16,9 @@
SUBDIRS = contrib src bin @apbs_do_tools@
+pkgconfigdir = @pkgconfigdir@
+pkgconfig_DATA = apbs.pc
+
distclean-local: clean-local
clean-local: clean-ac
|