Skip to content

Commit

Permalink
configure: Add --with-pkg{data,sysconf,libexec}dir options
Browse files Browse the repository at this point in the history
Quick hack for discussion.
  • Loading branch information
p-montanus committed Sep 28, 2015
1 parent 8fe1784 commit 2608055
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ libdir = @libdir@
incdir = @includedir@
mandir = @mandir@
datadir = @datadir@
pkgdatadir = @datadir@/@PACKAGE_NAME@
pkgdatadir = @pkgdatadir@
sysconfdir = @sysconfdir@
pkgsysconfdir = @sysconfdir@/@PACKAGE_NAME@
pkgsysconfdir = @pkgsysconfdir@
libexecdir = @libexecdir@
pkglibexecdir = @libexecdir@/@PACKAGE_NAME@
pkglibexecdir = @pkglibexecdir@
SLINK = @LN_S@
STRIP = @STRIP@
ifdef SPARSE
Expand Down
36 changes: 36 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,47 @@ AC_ARG_ENABLE(tmpdir,
[default directory for temporary files [ARG=/tmp]])],
tmpdir_specified=yes)

AC_ARG_WITH([pkgdatadir],
[AS_HELP_STRING([--with-pkgdatadir=DIR],
[ctags read-only architecture-independent data [DATADIR/ctags]])])

AC_ARG_WITH([pkgsysconfdir],
[AS_HELP_STRING([--with-pkgsysconfdir=DIR],
[ctags read-only single-machine data [SYSCONFDIR/ctags]])])

AC_ARG_WITH([pkglibexecdir],
[AS_HELP_STRING([--with-pkglibexecdir=DIR],
[ctags program executables [LIBEXECDIR/ctags]])])

AC_ARG_PROGRAM

# Process configuration options
# -----------------------------


case "${with_pkgdatadir+set}"-"$with_pkgdatadir" in #(
"set"-"yes" | "set"-"no") pkgdatadir="${datadir}/ctags" ;; #(
"set"-*) pkgdatadir="${with_pkgdatadir}" ;; #(
*) pkgdatadir="${datadir}/ctags" ;;
esac

case "${with_pkgsysconfdir+set}"-"$with_pkgsysconfdir" in #(
"set"-"yes" | "set"-"no") pkgsysconfdir="${sysconfdir}/ctags" ;; #(
"set"-*) pkgsysconfdir="${with_pkgsysconfdir}" ;; #(
*) pkgsysconfdir="${sysconfdir}/ctags" ;;
esac

case "${with_pkglibexecdir+set}"-"$with_pkglibexecdir" in #(
"set"-"yes" | "set"-"no") pkglibexecdir="${libexecdir}/ctags" ;; #(
"set"-*) pkglibexecdir="${with_pkglibexecdir}" ;; #(
*) pkglibexecdir="${libexecdir}/ctags" ;;
esac

AC_SUBST([pkgdatadir])
AC_SUBST([pkgsysconfdir])
AC_SUBST([pkglibexecdir])


install_targets="install-ctags install-data install-libexec"
AC_MSG_CHECKING(whether to install link to etags)
if test yes = "$enable_etags"; then
Expand Down

0 comments on commit 2608055

Please sign in to comment.