aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-06 23:58:19 +0000
committerlloyd <[email protected]>2008-11-06 23:58:19 +0000
commit57061c2630f14325c02e1e06b5b67101e1f4fcce (patch)
tree638bc52465cff74f62da8c828d7c51f34fdddb09
parentb1381710e7726d0aa5a66ad5c3130904b88aa691 (diff)
Fix the --with-build-dir option, so that it is actually possible to do
out of tree builds. Also rename the generated botan-config script so that it is, like the pkg-config settings, namespaced by the major and minor version numbers (eg, botan-17-config). This is useful in particular for distros like Debian which ship both stable and unstable versions. Currently Debian is actually the only distro I know of shipping 1.7 as well as 1.6, but I would certainly like to encourage more in the future by making it easy to do.
-rwxr-xr-xconfigure.pl14
-rw-r--r--doc/examples/GNUmakefile4
2 files changed, 9 insertions, 9 deletions
diff --git a/configure.pl b/configure.pl
index a9104c0e3..5d08594de 100755
--- a/configure.pl
+++ b/configure.pl
@@ -101,26 +101,26 @@ sub main {
# Goes into build-specific dirs (maybe)
- $$config{'botan-config'} = 'botan-config';
+ $$config{'build-dir'} = 'build';
+ $$config{'botan-config'} = "botan-$major_minor-config";
$$config{'botan-pkgconfig'} = "botan-$major_minor.pc";
$$config{'makefile'} = 'Makefile';
$$config{'check_prefix'} = '';
$$config{'lib_prefix'} = '';
- if(defined($$config{'build-dir'})) {
-
- for my $var ('botan-config',
+ if(defined($$config{'with_build_dir'})) {
+ for my $var ('build-dir',
+ 'botan-config',
'botan-pkgconfig',
'makefile',
'check_prefix',
'lib_prefix')
{
- $$config{$var} = File::Spec->catfile($$config{'build-dir'},
+ $$config{$var} = File::Spec->catfile($$config{'with_build_dir'},
$$config{$var});
}
}
else {
- $$config{'build-dir'} = 'build';
}
choose_target($config);
@@ -724,7 +724,7 @@ sub get_options {
'use-module-set=s' => sub { add_module_sets($config, $_[1]); },
- 'with-build-dir=s' => sub { $$config{'build-dir'} = $_[1]; },
+ 'with-build-dir=s' => sub { &$save_option(@_); },
'with-endian=s' => sub { &$save_option(@_); },
'with-unaligned-mem=s' => sub { &$save_option(@_); },
'with-local-config=s' =>
diff --git a/doc/examples/GNUmakefile b/doc/examples/GNUmakefile
index 4b45af0a6..0318e3016 100644
--- a/doc/examples/GNUmakefile
+++ b/doc/examples/GNUmakefile
@@ -5,9 +5,9 @@ BOTAN_DIR = ../..
CXX = g++
CFLAGS = -O2 -ansi -W -Wall
-INCLUDES = $(shell $(BOTAN_DIR)/botan-config --cflags)
+INCLUDES = $(shell $(BOTAN_DIR)/botan-17-config --cflags)
-LIBS = $(shell $(BOTAN_DIR)/botan-config --libs)
+LIBS = $(shell $(BOTAN_DIR)/botan-17-config --libs)
FLAGS = $(INCLUDES) $(CFLAGS) -I$(BOTAN_DIR)/build/include -L$(BOTAN_DIR)
SRCS=$(wildcard *.cpp)