aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2023-06-19 20:45:16 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2023-06-19 20:45:16 +0300
commit60a09132b62c3cae86f5e832830a4490ba5bf712 (patch)
treea893191d13b0bf294fb81439a27505822e1bac67 /configure.ac
parentb65c64a200dac8194dacc90ae2150b683f64cd8a (diff)
downloadsciteco-60a09132b62c3cae86f5e832830a4490ba5bf712.tar.gz
the SciTECO data installation path is now configurable via --with-scitecodatadir
* This is also the base of $SCITECOPATH. * Changing it is useful for packaging where it is not possible to factor out the common files between Curses and Gtk builds into a "sciteco-common" package. As an alternative, you can now create disjunct sciteco-curses and sciteco-gtk packages. * You will most likely want to use this for Gtk builds as in: --with-interface=gtk --program-prefix=g --with-scitecodatadir=/usr/local/share/gsciteco.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 14 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 18b878d..f672553 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,15 +36,6 @@ AC_SUBST(SCINTILLA_CXXFLAGS)
# Necessary so we can change their default values here
AC_SUBST(AM_CPPFLAGS)
-# SciTECO library macro directory
-scitecolibdir=$datadir/$PACKAGE/lib
-AC_SUBST(scitecolibdir)
-
-# These paths can be changed at install-time and
-# should not be written into config.h:
-AM_CPPFLAGS="$AM_CPPFLAGS -D'SCITECODATADIR=\"\$(pkgdatadir)\"' \
- -D'SCITECOLIBDIR=\"\$(scitecolibdir)\"'"
-
# Auxiliary functions
# expand $1 and print its absolute path
@@ -180,6 +171,20 @@ esac
# Config options
#
+AC_ARG_WITH(scitecodatadir,
+ AS_HELP_STRING([--with-scitecodatadir=PATH],
+ [Installation directory of data [default=DATADIR/sciteco]]),
+ [scitecodatadir=$withval], [scitecodatadir=$datadir/$PACKAGE])
+AC_SUBST(scitecodatadir)
+# SciTECO library macro directory
+scitecolibdir=$scitecodatadir/lib
+AC_SUBST(scitecolibdir)
+
+# These paths can be changed at install-time and
+# should not be written into config.h:
+AM_CPPFLAGS="$AM_CPPFLAGS -D'SCITECODATADIR=\"\$(scitecodatadir)\"' \
+ -D'SCITECOLIBDIR=\"\$(scitecolibdir)\"'"
+
# FIXME: It does not really make sense to have this configurable.
# It would make more sense to allow linking against an externally-provided
# Scintilla (some platforms ship with it).