aboutsummaryrefslogtreecommitdiffstats
path: root/configure.pl
diff options
context:
space:
mode:
authorlloyd <lloyd@randombit.net>2008-11-06 23:44:56 +0000
committerlloyd <lloyd@randombit.net>2008-11-06 23:44:56 +0000
commitad868620daaed3f73d157ad594ce317a05ebe23d (patch)
treeb2bca3f1cee40c6e1a4dcf12afdc739f9b43d64a /configure.pl
parent94fe0194bbe5d9d5be9b1104cc81825a05e996e5 (diff)
Provide pkg-config file as botan-$major$minor.pc, so it can be used like:
$ pkg-config botan-17 --libs -L/usr/local/lib -lbotan -lm -lpthread -lrt to make it easier to have multiple versions of Botan installed and in use at the same time.
Diffstat (limited to 'configure.pl')
-rwxr-xr-xconfigure.pl34
1 files changed, 19 insertions, 15 deletions
diff --git a/configure.pl b/configure.pl
index d9656ac7a..f6335de34 100755
--- a/configure.pl
+++ b/configure.pl
@@ -97,26 +97,30 @@ sub main {
&$default_value_is('shared', 'yes');
&$default_value_is('local_config', '');
+ my $major_minor = $MAJOR_VERSION . $MINOR_VERSION;
+
# 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{'botan-config'} = 'botan-config';
+ $$config{'botan-pkgconfig'} = "botan-$major_minor.pc";
+ $$config{'makefile'} = 'Makefile';
+ $$config{'check_prefix'} = '';
+ $$config{'lib_prefix'} = '';
+
+ if(defined($$config{'build-dir'})) {
- $$config{'makefile'} =
- File::Spec->catfile($$config{'build-dir'}, 'Makefile');
- $$config{'check_prefix'} = $$config{'build-dir'};
- $$config{'lib_prefix'} = $$config{'build-dir'};
+ for my $var ('botan-config',
+ 'botan-pkgconfig',
+ 'makefile',
+ 'check_prefix',
+ 'lib_prefix')
+ {
+ $$config{$var} = File::Spec->catfile($$config{'build-dir'},
+ $$config{$var});
+ }
}
- else { # defaults
+ else {
$$config{'build-dir'} = 'build';
- $$config{'botan-config'} = 'botan-config';
- $$config{'botan-pkgconfig'} = 'botan.pc';
- $$config{'makefile'} = 'Makefile';
- $$config{'check_prefix'} = '';
- $$config{'lib_prefix'} = '';
}
choose_target($config);