aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-11-25 09:38:03 +0000
committerdos-reis <gdr@axiomatics.org>2013-11-25 09:38:03 +0000
commit70f1bcef17f77f31f8c60d0fbe07e019202088db (patch)
tree2b929b3802080d24e5c0cce9042ca0dde62b4941
parentd610364e2c1f450849d307886cada123b9a8717a (diff)
downloadopen-axiom-70f1bcef17f77f31f8c60d0fbe07e019202088db.tar.gz
Check for Windows PowerShell.
-rw-r--r--Makefile.in1
-rw-r--r--config/open-axiom.m412
-rwxr-xr-xconfigure74
-rw-r--r--configure.ac5
-rw-r--r--src/Makefile.in1
-rw-r--r--src/algebra/Makefile.in1
-rw-r--r--src/io/Makefile.in1
-rw-r--r--src/rt/Makefile.in1
-rw-r--r--src/syntax/Makefile.in1
9 files changed, 89 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index 2933ac84..55ff07f6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -335,6 +335,7 @@ NM = @NM@
NMEDIT = @NMEDIT@
OA_QT_MOC = @OA_QT_MOC@
OA_QT_QMAKE = @OA_QT_QMAKE@
+OA_WINDOWS_POWERSHELL = @OA_WINDOWS_POWERSHELL@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index 35e963bc..8d7c3e13 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -21,11 +21,13 @@ AC_CHECK_TYPES([uintmax_t],[],[AC_TYPE_UINTMAX_T])
AC_TYPE_UID_T
])
-dnl ---------------------------------------
-dnl -- OPENXIOM_CHECK_WINDOWS_POWERSHELL --
-dnl ---------------------------------------
-dnl On Windows platforms check for availability of PowerShell.
-AC_DEFUN([OPENAXIOM_CHECK_WINDOWS_POWERSHELL],[
+dnl ----------------------
+dnl -- OPENAXIOM_SHELLS --
+dnl ----------------------
+dnl Check for shell availability, specifically PowerShell on
+dnl Windows platforms.
+AC_DEFUN([OPENAXIOM_SHELLS],[
+AC_SYS_INTERPRETER
case $host in
*mingw*)
AC_PATH_PROG([OA_WINDOWS_POWERSHELL],[powershell.exe])
diff --git a/configure b/configure
index d095e85b..65005b7a 100755
--- a/configure
+++ b/configure
@@ -740,6 +740,7 @@ oa_delay_ffi
oa_standard_linking
axiom_lisp_flavor
AXIOM_LISP
+OA_WINDOWS_POWERSHELL
open_axiom_installdir
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
@@ -3670,10 +3671,79 @@ open_axiom_installdir=$libdir/open-axiom/$target/$PACKAGE_VERSION
if test $build != $target; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cross build is not supported yet." >&5
$as_echo "$as_me: WARNING: Cross build is not supported yet." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please notify open-axiom-devel@open-axiom.org if you succeed." >&5
-$as_echo "$as_me: WARNING: Please notify open-axiom-devel@open-axiom.org if you succeed." >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please notify open-axiom-devel@lists.sf.net if you succeed." >&5
+$as_echo "$as_me: WARNING: Please notify open-axiom-devel@lists.sf.net if you succeed." >&2;}
fi
+## Determine interpreters and shells.
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
+$as_echo_n "checking whether #! works in shell scripts... " >&6; }
+if ${ac_cv_sys_interpreter+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ echo '#! /bin/cat
+exit 69
+' >conftest
+chmod u+x conftest
+(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
+if test $? -ne 69; then
+ ac_cv_sys_interpreter=yes
+else
+ ac_cv_sys_interpreter=no
+fi
+rm -f conftest
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5
+$as_echo "$ac_cv_sys_interpreter" >&6; }
+interpval=$ac_cv_sys_interpreter
+
+case $host in
+ *mingw*)
+ # Extract the first word of "powershell.exe", so it can be a program name with args.
+set dummy powershell.exe; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_OA_WINDOWS_POWERSHELL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $OA_WINDOWS_POWERSHELL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_OA_WINDOWS_POWERSHELL="$OA_WINDOWS_POWERSHELL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_OA_WINDOWS_POWERSHELL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+OA_WINDOWS_POWERSHELL=$ac_cv_path_OA_WINDOWS_POWERSHELL
+if test -n "$OA_WINDOWS_POWERSHELL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OA_WINDOWS_POWERSHELL" >&5
+$as_echo "$OA_WINDOWS_POWERSHELL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ ;;
+esac
+
+
## Although OpenAxiom does not support cross build yet, let
## alone Canadian cross, we want to make sure that we do not write
## the build machinery in a way that actively unsupports
diff --git a/configure.ac b/configure.ac
index b47003c5..7f26a382 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,9 +65,12 @@ dnl Note that we do not stop the configuration process because we do seek
dnl contributions for cross build support.
if test $build != $target; then
AC_MSG_WARN([Cross build is not supported yet.])
- AC_MSG_WARN([Please notify open-axiom-devel@open-axiom.org if you succeed.])
+ AC_MSG_WARN([Please notify open-axiom-devel@lists.sf.net if you succeed.])
fi
+## Determine interpreters and shells.
+OPENAXIOM_SHELLS
+
## Although OpenAxiom does not support cross build yet, let
## alone Canadian cross, we want to make sure that we do not write
## the build machinery in a way that actively unsupports
diff --git a/src/Makefile.in b/src/Makefile.in
index 1c547716..40a412a6 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -265,6 +265,7 @@ NM = @NM@
NMEDIT = @NMEDIT@
OA_QT_MOC = @OA_QT_MOC@
OA_QT_QMAKE = @OA_QT_QMAKE@
+OA_WINDOWS_POWERSHELL = @OA_WINDOWS_POWERSHELL@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index b9895acb..fc3594a4 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -450,6 +450,7 @@ NM = @NM@
NMEDIT = @NMEDIT@
OA_QT_MOC = @OA_QT_MOC@
OA_QT_QMAKE = @OA_QT_QMAKE@
+OA_WINDOWS_POWERSHELL = @OA_WINDOWS_POWERSHELL@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
diff --git a/src/io/Makefile.in b/src/io/Makefile.in
index d3f632a3..dd2f3fab 100644
--- a/src/io/Makefile.in
+++ b/src/io/Makefile.in
@@ -262,6 +262,7 @@ NM = @NM@
NMEDIT = @NMEDIT@
OA_QT_MOC = @OA_QT_MOC@
OA_QT_QMAKE = @OA_QT_QMAKE@
+OA_WINDOWS_POWERSHELL = @OA_WINDOWS_POWERSHELL@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
diff --git a/src/rt/Makefile.in b/src/rt/Makefile.in
index 0123a572..b69af346 100644
--- a/src/rt/Makefile.in
+++ b/src/rt/Makefile.in
@@ -262,6 +262,7 @@ NM = @NM@
NMEDIT = @NMEDIT@
OA_QT_MOC = @OA_QT_MOC@
OA_QT_QMAKE = @OA_QT_QMAKE@
+OA_WINDOWS_POWERSHELL = @OA_WINDOWS_POWERSHELL@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
diff --git a/src/syntax/Makefile.in b/src/syntax/Makefile.in
index 38088208..fd378d43 100644
--- a/src/syntax/Makefile.in
+++ b/src/syntax/Makefile.in
@@ -262,6 +262,7 @@ NM = @NM@
NMEDIT = @NMEDIT@
OA_QT_MOC = @OA_QT_MOC@
OA_QT_QMAKE = @OA_QT_QMAKE@
+OA_WINDOWS_POWERSHELL = @OA_WINDOWS_POWERSHELL@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@