diff options
author | Mike Burns <mike@mike-burns.com> | 2014-03-28 15:12:03 +0100 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2014-03-28 15:59:03 +0100 |
commit | c2c7d34973a97c3efb76cf91cce81ffffe131985 (patch) | |
tree | eebb53b98f4acb50794c5256079a70c78adf831c | |
parent | 9805390bda7bfe213770c525065e06b111143996 (diff) |
Discover a POSIX shell for Solaris
Under Solaris, use ksh instead of `/bin/sh`.
This uses `$SHELL` as a POSIX shell, coupled with a `configure` check
that sets it correctly.
Note that the POSIX shell might end up being bash, so this actually
introduces more fragmentation than it reduces.
Taken from https://github.com/freedreno/mesa/blob/master/configure.ac
-rw-r--r-- | .gitignore | 4 | ||||
-rwxr-xr-x | bin/lsrc.in (renamed from bin/lsrc) | 2 | ||||
-rwxr-xr-x | bin/mkrc.in (renamed from bin/mkrc) | 2 | ||||
-rwxr-xr-x | bin/rcdn.in (renamed from bin/rcdn) | 2 | ||||
-rwxr-xr-x | bin/rcup.in (renamed from bin/rcup) | 2 | ||||
-rw-r--r-- | configure.ac | 9 |
6 files changed, 16 insertions, 5 deletions
@@ -18,6 +18,10 @@ depcomp debian/rcm debian/rcm.debhelper.log share/rcm.sh +bin/lsrc +bin/mkrc +bin/rcup +bin/rcdn *deb NEWS.md rcm-*.tar.gz @@ -1,4 +1,4 @@ -#!/bin/sh +#!@SHELL@ : ${RCM_LIB:=$(dirname "$0")/../share/rcm} . "$RCM_LIB/rcm.sh" @@ -1,4 +1,4 @@ -#!/bin/sh +#!@SHELL@ : ${RCM_LIB:=$(dirname "$0")/../share/rcm} . "$RCM_LIB/rcm.sh" @@ -1,4 +1,4 @@ -#!/bin/sh +#!@SHELL@ : ${RCM_LIB:=$(dirname "$0")/../share/rcm} . "$RCM_LIB/rcm.sh" @@ -1,4 +1,4 @@ -#!/bin/sh +#!@SHELL@ : ${RCM_LIB:=$(dirname "$0")/../share/rcm} . "$RCM_LIB/rcm.sh" diff --git a/configure.ac b/configure.ac index d938afc..4eb0b00 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,13 @@ AC_INIT(rcm, 1.2.1, mburns@thoughtbot.com) AM_INIT_AUTOMAKE # Checks for programs. +case "$host_os" in +solaris*) + AC_PATH_PROGS(POSIX_SHELL, [ksh93 ksh sh]) + SHELL="$POSIX_SHELL" + ;; +esac +AC_SUBST([SHELL]) # Checks for libraries. @@ -16,4 +23,4 @@ AM_INIT_AUTOMAKE # Checks for library functions. AM_EXTRA_RECURSIVE_TARGETS([release_build_man_html release_push_man_html release_clean_man_html]) -AC_OUTPUT(Makefile bin/Makefile man/Makefile share/Makefile share/rcm.sh NEWS.md) +AC_OUTPUT(Makefile bin/Makefile man/Makefile share/Makefile share/rcm.sh NEWS.md bin/lsrc bin/mkrc bin/rcdn bin/rcup) |