aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2022-03-08 03:56:13 +0100
committertgingold <tgingold@users.noreply.github.com>2022-03-11 08:07:52 +0100
commit87df6ea6f5f49984884b6c5c336aad4e6b8dcdbe (patch)
treee63ac47d21490a300d597a685c3b34064dfe6b86 /configure
parent430d1ba5b09e4a2a20dc92156e5a1c69dd30bea0 (diff)
downloadghdl-87df6ea6f5f49984884b6c5c336aad4e6b8dcdbe.tar.gz
ghdl-87df6ea6f5f49984884b6c5c336aad4e6b8dcdbe.tar.bz2
ghdl-87df6ea6f5f49984884b6c5c336aad4e6b8dcdbe.zip
mk: Introduce configure options for inc/libdirsuffix
This patch is based on one from the Debian ghdl packaging. We use it to support coinstallability of the different ghdl backend executables. Force prepending ghdl/ to the include path really doesn't help us with that any. Note this effectively reverts 786ca17ce.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 18 insertions, 4 deletions
diff --git a/configure b/configure
index bac23ea59..650fa8580 100755
--- a/configure
+++ b/configure
@@ -33,7 +33,9 @@ ADA_FLAGS=${ADA_FLAGS:-}
MAKE=${MAKE:-make}
LDFLAGS=${LDFLAGS:-}
prefix=/usr/local
-libdirsuffix=lib/ghdl
+libdirsuffix=lib
+libghdldirsuffix=lib/ghdl
+incdirsuffix=include/ghdl
libdirreverse=../..
gcc_src_dir=
llvm_config=
@@ -54,7 +56,11 @@ PIC_FLAGS=-fPIC
show_help=no
progname=$0
-subst_vars="CC CXX GNATMAKE ADA_FLAGS MAKE CFLAGS CXXFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_gplcompat enable_libghdl libghdl_version ghdl_version"
+subst_vars="CC CXX GNATMAKE ADA_FLAGS MAKE CFLAGS CXXFLAGS LDFLAGS build
+srcdir abs_srcdir prefix backend libdirsuffix libghdldirsuffix
+libdirreverse incdirsuffix gcc_src_dir llvm_config llvm_be backtrace_lib
+build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks
+enable_gplcompat enable_libghdl libghdl_version ghdl_version"
# Find srcdir
srcdir=`dirname $progname`
@@ -93,6 +99,9 @@ for opt do
;;
--prefix=*) prefix="$optarg";;
--srcdir=*) srcdir="$optarg";;
+ --libdir=*) libdirsuffix="$optarg";;
+ --libghdldir=*) libghdldirsuffix="$optarg";;
+ --incdir=*) incdirsuffix="$optarg";;
--with-gcc=*) gcc_src_dir="$optarg"; backend=gcc;;
--with-llvm=*)
echo "--with-llvm is deprecated, use --with-llvm-config"
@@ -128,6 +137,9 @@ Usage: configure [options]
Options [defaults in brackets]:
--prefix=PREFIX install in PREFIX [$prefix]
--srcdir=SRCDIR source code path [$srcdir]
+ --libdir=LIBDIR lib dir path relative to PREFIX [$libdirsuffix]
+ --libghdldir=LIBDIR ghdl lib dir path relative to PREFIX [$libdirsuffix]
+ --incdir=INCDIR C include dir path relative to PREFIX [$incdirsuffix]
--with-gcc=DIR use gcc backend from DIR
--with-llvm-config[=LLVM-CONFIG] use llvm backend [llvm-config]
--with-backtrace-lib=LIB.a link with libbacktrace LIB.a to display a
@@ -249,7 +261,7 @@ if test $backend = gcc; then
fi
if test "x$backtrace_lib" = x ; then
# Automatically use libbacktrace from gcc.
- backtrace_lib="$prefix/$libdirsuffix/libbacktrace.a"
+ backtrace_lib="$prefix/$libghdldirsuffix/libbacktrace.a"
fi
fi
@@ -413,7 +425,9 @@ sed -e "s%@COMPILER_GCC@%ghdl1-gcc$EXEEXT%" \
-e "s%@COMPILER_LLVM@%ghdl1-llvm$EXEEXT%" \
-e "s%@POST_PROCESSOR@%oread-$backend%" \
-e "s%@INSTALL_PREFIX@%$prefix%" \
- -e "s%@LIB_PREFIX@%$libdirsuffix%" \
+ -e "s%@LIBDIR_SUFFIX@%$libdirsuffix%" \
+ -e "s%@LIBGHDLDIR_SUFFIX@%$libghdldirsuffix%" \
+ -e "s%@INCDIR_SUFFIX@%$incdirsuffix%" \
-e "s%@SOEXT@%$SOEXT%" \
-e "s%@default_pic@%$default_pic%" \
< $srcdir/src/ghdldrv/default_paths.ads.in > default_paths.ads