diff options
author | lloyd <[email protected]> | 2008-10-15 08:26:49 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-15 08:26:49 +0000 |
commit | c4dd584e3bfaf53f941ca11f3000f23dc3c8c9f7 (patch) | |
tree | 39d0481461dbf225e10247afee4a7ffffe9d8ba1 | |
parent | b60201225e7372a37fe93e148ffedf8d1fa46f5f (diff) |
Add pkg-config support (requested/suggested by Zack Weinberg on monotone-dev)
-rw-r--r-- | .mtn-ignore | 1 | ||||
-rwxr-xr-x | configure.pl | 10 | ||||
-rw-r--r-- | src/build-data/botan.pc.in | 11 |
3 files changed, 22 insertions, 0 deletions
diff --git a/.mtn-ignore b/.mtn-ignore index b36761911..a96af4c43 100644 --- a/.mtn-ignore +++ b/.mtn-ignore @@ -1,5 +1,6 @@ ^Makefile$ ^botan-config$ +^botan.pc$ ^build$ ^build/build\.h$ ^build/checks$ diff --git a/configure.pl b/configure.pl index 20dcddbaa..58d0f9f42 100755 --- a/configure.pl +++ b/configure.pl @@ -97,9 +97,14 @@ sub main { &$default_value_is('shared', 'yes'); &$default_value_is('local_config', ''); + # Goes into build-specific dirs (maybe) if(defined($$config{'build-dir'})) { $$config{'botan-config'} = File::Spec->catfile($$config{'build-dir'}, 'botan-config'); + + $$config{'botan-pkgconfig'} = + File::Spec->catfile($$config{'build-dir'}, 'botan.pc'); + $$config{'makefile'} = File::Spec->catfile($$config{'build-dir'}, 'Makefile'); $$config{'check_prefix'} = $$config{'build-dir'}; @@ -108,6 +113,7 @@ sub main { else { # defaults $$config{'build-dir'} = 'build'; $$config{'botan-config'} = 'botan-config'; + $$config{'botan-pkgconfig'} = 'botan.pc'; $$config{'makefile'} = 'Makefile'; $$config{'check_prefix'} = ''; $$config{'lib_prefix'} = ''; @@ -1746,6 +1752,10 @@ sub write_pkg_config { $botan_config, $config); chmod 0755, $botan_config; + process_template( + File::Spec->catfile($$config{'config-dir'}, 'botan.pc.in'), + $$config{'botan-pkgconfig'}, $config); + delete $$config{'link_to'}; } diff --git a/src/build-data/botan.pc.in b/src/build-data/botan.pc.in new file mode 100644 index 000000000..a061652c2 --- /dev/null +++ b/src/build-data/botan.pc.in @@ -0,0 +1,11 @@ +prefix=@{var:prefix} +exec_prefix=${prefix} +libdir=${prefix}/@{var:libdir} +includedir=${prefix}/include + +Name: Botan +Description: Multi-platform C++ crypto library +Version: @{var:version} + +Libs: -L${libdir} -lbotan @{var:link_to} +Cflags: -I${includedir} |