From c638b5601e91d8a48ce63906ba5874603f3437ef Mon Sep 17 00:00:00 2001 From: Katsuhiko Nishimra Date: Fri, 6 Dec 2013 11:59:40 +0900 Subject: [PATCH 1/5] libint2.pc.in --- libint2.pc.in | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 libint2.pc.in diff --git a/libint2.pc.in b/libint2.pc.in new file mode 100644 index 000000000..c9690e1da --- /dev/null +++ b/libint2.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libint2 +Description: a library for the evaluation of molecular integrals of many-body operators over Gaussian functions +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lint2 +Cflags:-I${includedir}/libint2 From 58fef0276c4552294dcf5cc34ff762fccf839a1c Mon Sep 17 00:00:00 2001 From: Katsuhiko Nishimra Date: Fri, 6 Dec 2013 12:00:41 +0900 Subject: [PATCH 2/5] AC_CONFIG_FILES libint2.pc.in --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 697c59bf2..6d76172ce 100644 --- a/configure.ac +++ b/configure.ac @@ -1392,7 +1392,7 @@ AC_CONFIG_FILES([src/bin/test_eri/stdtests.pl],[chmod +x src/bin/test_eri/stdtes AC_CONFIG_FILES([src/bin/test_eri/run_timing_suite.pl],[chmod +x src/bin/test_eri/run_timing_suite.pl]) AC_CONFIG_FILES(src/bin/MakeVars src/lib/MakeVars src/lib/MakeRules doc/MakeVars doc/MakeRules doc/progman/macros.tex doc/classdoc/doxygen.cfg - src/bin/libint/cgshell_ordering.h) + src/bin/libint/cgshell_ordering.h libint2.pc) dnl --------- Done! --------- AC_OUTPUT From 9c626bf8f66f0002c254c2eb79e47e66645b03a0 Mon Sep 17 00:00:00 2001 From: Katsuhiko Nishimra Date: Tue, 10 Dec 2013 14:19:31 +0900 Subject: [PATCH 3/5] Install rule for pkgconfig data file --- Makefile | 9 ++++++++- configure.ac | 7 +++++++ src/lib/MakeVars.in | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9d5b8c982..6b96f7c99 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ ifndef SRCDIR endif -include $(TOPDIR)/Makedirlist +-include $(TOPDIR)/src/lib/MakeVars SUBDIRS = src ALLSUBDIRS = $(SUBDIRS) doc @@ -25,12 +26,18 @@ export:: done (cd export && $(MAKE) $(DODEPENDOPT) export) || exit 1; -install:: +install:: install_pkgconfig for dir in $(SUBDIRS); \ do \ (cd $${dir} && $(MAKE) $(DODEPENDOPT) install) || exit 1; \ done +ifdef pkgconfigdir +install_pkgconfig:: + $(INSTALL) $(INSTALLDIROPT) $(pkgconfigdir) + $(INSTALL) $(INSTALLLIBOPT) $(TOPDIR)/libint2.pc $(pkgconfigdir) +endif + install_inc:: for dir in $(SUBDIRS); \ do \ diff --git a/configure.ac b/configure.ac index 6d76172ce..86f2420a0 100644 --- a/configure.ac +++ b/configure.ac @@ -900,6 +900,13 @@ SCRATCHDIR=$withval ) AC_SUBST(SCRATCHDIR) +PKGCONFIGDIR='$(libdir)/pkgconfig' +AC_ARG_WITH(pkgconfigdir, +[ --with-pkgconfigdir Specifies the location to put pkg-config's data file. Default is $(libdir)/pkgconfig.], +PKGCONFIGDIR=$withval +) +AC_SUBST(PKGCONFIGDIR) + dnl --------- Want absolute path for srcdir, not relative. --------- if test X$ac_srcdir_defaulted = Xyes; then diff --git a/src/lib/MakeVars.in b/src/lib/MakeVars.in index 16fd3d65d..0f0dd2b86 100644 --- a/src/lib/MakeVars.in +++ b/src/lib/MakeVars.in @@ -84,6 +84,7 @@ exec_prefix=@exec_prefix@ bindir=@bindir@ libdir=@libdir@ includedir=@libintincludedir@ +pkgconfigdir=@PKGCONFIGDIR@ RANLIB = @RANLIB@ COMPRESS = gzip From 81c58ca0aca73fa89224fd4594bf686fc2c2fea0 Mon Sep 17 00:00:00 2001 From: Katsuhiko Nishimra Date: Wed, 11 Dec 2013 18:22:19 +0900 Subject: [PATCH 4/5] Export pkg-config data file installation rule --- export/MakeRules.export | 6 +++++- export/MakeVars.export | 1 + export/Makefile | 1 + export/configure.export | 9 ++++++++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/export/MakeRules.export b/export/MakeRules.export index 474f42418..d04d2b397 100644 --- a/export/MakeRules.export +++ b/export/MakeRules.export @@ -1,7 +1,7 @@ default:: $(TOPDIR)/lib/$(TARGET) -install:: install_inc install_target +install:: install_inc install_target install_pkgconfig install_inc:: $(TOPDIR)/lib/$(TARGET) $(INSTALL) $(INSTALLDIROPT) $(DESTDIR)$(includedir)/$(NAME)$(VERSION) @@ -17,6 +17,10 @@ install_inc:: $(TOPDIR)/lib/$(TARGET) -$(INSTALL) $(INSTALLLIBOPT) $(TOPDIR)/include/libint2_config.h $(DESTDIR)$(includedir)/$(NAME)$(VERSION) -$(INSTALL) $(INSTALLLIBOPT) $(SRCTOPDIR)/include/boys.h $(DESTDIR)$(includedir)/$(NAME)$(VERSION) +install_pkgconfig:: + $(INSTALL) $(INSTALLDIROPT) $(pkgconfigdir) + $(INSTALL) $(INSTALLLIBOPT) $(TOPDIR)/libint2.pc $(pkgconfigdir) + install_target:: $(TOPDIR)/lib/$(TARGET) $(INSTALL) $(INSTALLDIROPT) $(DESTDIR)$(libdir) $(LTINST) $(INSTALL) $(INSTALLLIBOPT) $< $(DESTDIR)$(libdir) diff --git a/export/MakeVars.export b/export/MakeVars.export index c457d775f..39782525f 100644 --- a/export/MakeVars.export +++ b/export/MakeVars.export @@ -70,6 +70,7 @@ exec_prefix=@exec_prefix@ bindir=@bindir@ libdir=@libdir@ includedir=@libintincludedir@ +pkgconfigdir=@PKGCONFIGDIR@ RANLIB = @RANLIB@ COMPRESS = gzip diff --git a/export/Makefile b/export/Makefile index 181bb0d2a..3e4620b29 100644 --- a/export/Makefile +++ b/export/Makefile @@ -54,6 +54,7 @@ exportdir:: -$(INSTALL) $(INSTALLLIBOPT) $(SRCTOPDIR)/src/bin/libint/util_types.h $(TOPDIR)/$(EXPORTDIR)/include -$(INSTALL) $(INSTALLLIBOPT) $(SRCTOPDIR)/src/bin/libint/cgshellinfo.h $(TOPDIR)/$(EXPORTDIR)/include -$(INSTALL) $(INSTALLLIBOPT) $(SRCTOPDIR)/src/lib/libint/*.h $(TOPDIR)/$(EXPORTDIR)/include + -$(INSTALL) $(INSTALLLIBOPT) $(SRCTOPDIR)/libint2.pc.in $(TOPDIR)/$(EXPORTDIR) -$(INSTALL) $(INSTALLLIBOPT) $(TOPDIR)/src/bin/libint/cgshell_ordering.h $(TOPDIR)/$(EXPORTDIR)/include -$(INSTALL) $(INSTALLLIBOPT) $(TOPDIR)/include/libint2_config.h $(TOPDIR)/$(EXPORTDIR)/include/libint2_config.h.in -$(INSTALL) $(INSTALLLIBOPT) $(SRCDIR)/INSTALL.export $(TOPDIR)/$(EXPORTDIR)/INSTALL diff --git a/export/configure.export b/export/configure.export index 180f3f5e5..91ce6a7a9 100644 --- a/export/configure.export +++ b/export/configure.export @@ -143,6 +143,13 @@ LDFLAGS=$withval echo Using extra library directories: $withval ) +PKGCONFIGDIR='$(libdir)/pkgconfig' +AC_ARG_WITH(pkgconfigdir, +[ --with-pkgconfigdir Specifies the location to put pkg-config's data file. Default is $(libdir)/pkgconfig.], +PKGCONFIGDIR=$withval +) +AC_SUBST(PKGCONFIGDIR) + dnl --------- Want absolute path for srcdir, not relative. --------- if test X$ac_srcdir_defaulted = Xyes; then @@ -399,7 +406,7 @@ LIBSUF=la ENABLESHARED=yes AC_SUBST(ENABLESHARED) -AC_CONFIG_FILES(MakeVars MakeRules MakeSuffixRules doc/Makefile) +AC_CONFIG_FILES(MakeVars MakeRules MakeSuffixRules doc/Makefile libint2.pc) dnl --------- Done! --------- AC_OUTPUT From 80a86686dfb1415950e1c3cb05addbbb55ded90e Mon Sep 17 00:00:00 2001 From: Katsuhiko Nishimra Date: Tue, 17 Dec 2013 15:01:13 +0900 Subject: [PATCH 5/5] Add include directory to libint2.pc.in --- libint2.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libint2.pc.in b/libint2.pc.in index c9690e1da..468060361 100644 --- a/libint2.pc.in +++ b/libint2.pc.in @@ -7,4 +7,4 @@ Name: libint2 Description: a library for the evaluation of molecular integrals of many-body operators over Gaussian functions Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lint2 -Cflags:-I${includedir}/libint2 +Cflags: -I${includedir} -I${includedir}/libint2