Declared $ecldir and $docdir to be Autoconf precious variables.
authorArto Bendiken <arto@bendiken.net>
Tue, 23 Sep 2014 14:07:41 +0000 (14:07 +0000)
committerArto Bendiken <arto@bendiken.net>
Tue, 23 Sep 2014 14:07:41 +0000 (14:07 +0000)
This enables overriding them when configuring the build, e.g.:

    $ ./configure ecldir=/usr/local/lib/ecl \
                  docdir=/usr/local/share/doc/ecl

src/configure
src/configure.in

index 61faa24..56af8c4 100755 (executable)
@@ -813,6 +813,8 @@ with_x
       ac_precious_vars='build_alias
 host_alias
 target_alias
+ecldir
+docdir
 CC
 CFLAGS
 LDFLAGS
@@ -1444,7 +1446,7 @@ Optional Features:
   --enable-rpath          hard-code the location of the ECL shared library.
                           (no|yes, default=NO)
   --enable-threads        support for native threads (yes|no|auto,
-                          default=YES).
+                          default=auto).
   --enable-boehm          use the Boehm-Weiser garbage collector
                           (no|included|system|auto, default=auto)
   --enable-libatomic      version of the libatomic-ops library
@@ -1529,6 +1531,8 @@ Optional Packages:
   --with-x                use the X Window System
 
 Some influential environment variables:
+  ecldir      the directory where *.fas files are installed
+  docdir      the directory where documentation is installed
   CC          C compiler command
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
@@ -3007,7 +3011,9 @@ else
 fi
 
 
-ecldir="${libdir}/ecl-${PACKAGE_VERSION}"
+
+test -z "${ecldir}" && ecldir="${libdir}/ecl-${PACKAGE_VERSION}"
+
 
 test -z "${docdir}" && docdir="${datadir}/doc/ecl-${PACKAGE_VERSION}"
 
index 2aa3bd5..3546e08 100644 (file)
@@ -302,8 +302,10 @@ AC_ARG_WITH(unicode-names,
 
 dnl -----------------------------------------------------------------------
 dnl Installation directories
-ecldir="${libdir}/ecl-${PACKAGE_VERSION}"
+AC_ARG_VAR([ecldir], [the directory where *.fas files are installed])
+test -z "${ecldir}" && ecldir="${libdir}/ecl-${PACKAGE_VERSION}"
 AC_SUBST([ecldir])
+AC_ARG_VAR([docdir], [the directory where documentation is installed])
 test -z "${docdir}" && docdir="${datadir}/doc/ecl-${PACKAGE_VERSION}"
 AC_SUBST([docdir])