aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2016-09-02 15:53:03 +1000
committerSteve Bennett <steveb@workware.net.au>2016-10-17 09:02:31 +1000
commitaa4427dee7168d55c38e1368264ddaec006dad43 (patch)
treec208b2ffc0aa98d27696ce3cb6a6cc16a6baf830
parentca0cca7b2efe6c81edcd7cc7ffdccaea4d702ac6 (diff)
downloadjimtcl-aa4427dee7168d55c38e1368264ddaec006dad43.zip
jimtcl-aa4427dee7168d55c38e1368264ddaec006dad43.tar.gz
jimtcl-aa4427dee7168d55c38e1368264ddaec006dad43.tar.bz2
Add pkg-config support: jimtcl.pc
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--Makefile.in1
-rw-r--r--auto.def6
-rw-r--r--autosetup/local.tcl2
-rw-r--r--jimtcl.pc.in13
4 files changed, 21 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index b96f3a2..5d77f81 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -85,6 +85,7 @@ install: all @TCL_EXTS@ install-exec install-docs
$(INSTALL_DATA) jim-config.h $(DESTDIR)@includedir@
$(INSTALL_DATA_DIR) $(DESTDIR)@bindir@
$(INSTALL_DATA) build-jim-ext $(DESTDIR)@bindir@
+ $(INSTALL_DATA) jimtcl.pc $(DESTDIR)@libdir@/pkgconfig
install-exec: all
$(INSTALL_DATA_DIR) $(DESTDIR)@bindir@
diff --git a/auto.def b/auto.def
index ee411a6..f39ebe3 100644
--- a/auto.def
+++ b/auto.def
@@ -231,6 +231,7 @@ if {[opt-bool-or-full ipv6]} {
msg-result "Enabling IPv6"
define JIM_IPV6
}
+define-append PKG_CONFIG_REQUIRES ""
if {[opt-bool-or-full ssl]} {
if {[pkg-config-init 0]} {
foreach pkg {openssl libssl} {
@@ -240,6 +241,7 @@ if {[opt-bool-or-full ssl]} {
define-append LDFLAGS [pkg-config-get $pkg LDFLAGS]
define-append CCOPTS [pkg-config-get $pkg CFLAGS]
msg-result "Enabling SSL ($pkg)"
+ define-append PKG_CONFIG_REQUIRES $pkg
break
}
}
@@ -272,7 +274,8 @@ if {[opt-bool shared with-jim-shared]} {
msg-result "Building static library"
define JIM_STATICLIB
}
-define LIBSOEXT [format [get-define SH_SOEXTVER] [format %.2f [expr {[get-define JIM_VERSION] / 100.0}]]]
+define VERSION [format %.2f [expr {[get-define JIM_VERSION] / 100.0}]]
+define LIBSOEXT [format [get-define SH_SOEXTVER] [get-define VERSION]]
define JIM_INSTALL [opt-bool install-jim]
define JIM_DOCS [opt-bool docs]
define JIM_RANDOMISE_HASH [opt-bool random-hash]
@@ -437,5 +440,6 @@ make-config-header jim-config.h -auto {HAVE_LONG_LONG* JIM_UTF8} -bare JIM_VERSI
make-config-header jimautoconf.h -auto {jim_ext_* TCL_PLATFORM_* TCL_LIBRARY USE_* JIM_* _FILE_OFFSET*} -bare {S_I*}
make-template Makefile.in
make-template build-jim-ext.in
+make-template jimtcl.pc.in
catch {exec chmod +x build-jim-ext}
diff --git a/autosetup/local.tcl b/autosetup/local.tcl
index bf86c5c..e9e5a1d 100644
--- a/autosetup/local.tcl
+++ b/autosetup/local.tcl
@@ -121,6 +121,7 @@ proc check-extension-status {ext required} {
define-append LDLIBS_$ext [pkg-config-get $pkg LIBS]
define-append LDFLAGS [pkg-config-get $pkg LDFLAGS]
define-append CCOPTS [pkg-config-get $pkg CFLAGS]
+ define-append PKG_CONFIG_REQUIRES $pkg
} else {
foreach i [ext-get $ext libdep] {
define-append LDLIBS_$ext [get-define $i ""]
@@ -145,6 +146,7 @@ proc check-extension-status {ext required} {
define-append LDLIBS [pkg-config-get $pkg LIBS]
define-append LDFLAGS [pkg-config-get $pkg LDFLAGS]
define-append CCOPTS [pkg-config-get $pkg CFLAGS]
+ define-append PKG_CONFIG_REQUIRES $pkg
} else {
foreach i [ext-get $ext libdep] {
define-append LDLIBS [get-define $i ""]
diff --git a/jimtcl.pc.in b/jimtcl.pc.in
new file mode 100644
index 0000000..a7e3c03
--- /dev/null
+++ b/jimtcl.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: jimtcl
+URL: http://jim.tcl.tk/
+Description: The Jim Interpreter - A small-footprint implementation of the Tcl programming language.
+Version: @VERSION@
+Requires: @PKG_CONFIG_REQUIRES@
+Libs: -L${libdir} -ljim
+Libs.private: @LDLIBS@
+Cflags: -I${includedir}