Commit 27b8836f authored by Timothy Stack's avatar Timothy Stack

Use autoconf macro (AC_EXEEXT) to detect whether or not we have to

append ".exe" in favor of the --enable-windowsclient option.
parent ae22c5c4
......@@ -59,7 +59,7 @@ INSTALL_APACHE_CONFIG = @INSTALL_APACHE_CONFIG@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL@ -m 755
EXE = @EXE_SUFFIX@
EXE = @EXEEXT@
INSTALL_DATA = @INSTALL@ -m 444
CLIENT_ETCDIR = @CLIENT_ETCDIR@
......
......@@ -33,8 +33,6 @@ ac_help="$ac_help
--disable-events Disable events (requires Elvin libraries)"
ac_help="$ac_help
--enable-windows Enable Windows XP support (default)"
ac_help="$ac_help
--enable-windowsclient Enable Windows XP client support (requires third-party software)"
ac_help="$ac_help
--enable-mezzanine Enable mezzanine support"
ac_help="$ac_help
......@@ -606,7 +604,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:610: checking for $ac_word" >&5
echo "configure:608: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -654,7 +652,7 @@ fi
PYTHON_INCLUDE="${PYTHON_PATH}/include/python${PYTHON_VERSION}"
CPPFLAGS="${CPPFLAGS} -I${PYTHON_INCLUDE}"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:658: checking how to run the C preprocessor" >&5
echo "configure:656: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
......@@ -669,13 +667,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 673 "configure"
#line 671 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -686,13 +684,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 690 "configure"
#line 688 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -703,13 +701,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 707 "configure"
#line 705 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -737,17 +735,17 @@ for ac_hdr in Python.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:741: checking for $ac_hdr" >&5
echo "configure:739: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 746 "configure"
#line 744 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -784,7 +782,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:788: checking host system type" >&5
echo "configure:786: checking host system type" >&5
host_alias=$host
case "$host_alias" in
......@@ -805,7 +803,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:809: checking build system type" >&5
echo "configure:807: checking build system type" >&5
build_alias=$build
case "$build_alias" in
......@@ -831,7 +829,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:835: checking for $ac_word" >&5
echo "configure:833: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -863,7 +861,7 @@ fi
# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
set dummy ${ac_tool_prefix}g++; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:867: checking for $ac_word" >&5
echo "configure:865: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -895,7 +893,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:899: checking for $ac_word" >&5
echo "configure:897: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -927,7 +925,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:931: checking for $ac_word" >&5
echo "configure:929: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -959,7 +957,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:963: checking for $ac_word" >&5
echo "configure:961: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -989,10 +987,106 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
echo "configure:992: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 997 "configure"
#include "confdefs.h"
int main() {
#ifndef __CYGWIN__
#define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
; return 0; }
EOF
if { (eval echo configure:1008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_cygwin=no
fi
rm -f conftest*
rm -f conftest*
fi
echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
echo "configure:1025: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1030 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
if { (eval echo configure:1037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_mingw32=no
fi
rm -f conftest*
rm -f conftest*
fi
echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:1056: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
ac_cv_exeext=.exe
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
if { (eval echo configure:1066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
else
{ echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
fi
rm -f conftest*
test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
fi
fi
EXEEXT=""
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
# Extract the first word of "elvin-config", so it can be a program name with args.
set dummy elvin-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:996: checking for $ac_word" >&5
echo "configure:1090: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ELVIN_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1027,7 +1121,7 @@ fi
# Extract the first word of "javac", so it can be a program name with args.
set dummy javac; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1031: checking for $ac_word" >&5
echo "configure:1125: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_JAVAC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1062,7 +1156,7 @@ fi
# Extract the first word of "jar", so it can be a program name with args.
set dummy jar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1066: checking for $ac_word" >&5
echo "configure:1160: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_JAR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1098,7 +1192,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ssh", so it can be a program name with args.
set dummy ${ac_tool_prefix}ssh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1102: checking for $ac_word" >&5
echo "configure:1196: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1750,27 +1844,6 @@ else
fi
#
# Enable Windows Client support.
# Right now this means we are building the client software under CygWin.
# You should also turn on --enable-windows.
# Off by default.
#
# Check whether --enable-windowsclient or --disable-windowsclient was given.
if test "${enable_windowsclient+set}" = set; then
enableval="$enable_windowsclient"
:
fi
if test "$enable_windowsclient" = "yes"; then
# This is needed in strip and install actions.
EXE_SUFFIX=".exe";
else
EXE_SUFFIX="";
fi
#
# Check for ulsshxmlrpc header
#
......@@ -1779,17 +1852,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1783: checking for $ac_hdr" >&5
echo "configure:1856: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1788 "configure"
#line 1861 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -1828,17 +1901,17 @@ for ac_hdr in linux/videodev.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1832: checking for $ac_hdr" >&5
echo "configure:1905: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1837 "configure"
#line 1910 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -1871,7 +1944,7 @@ done
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1875: checking for $ac_word" >&5
echo "configure:1948: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1950,7 +2023,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1954: checking for a BSD compatible install" >&5
echo "configure:2027: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2011,7 +2084,7 @@ esac
# Extract the first word of "rsync", so it can be a program name with args.
set dummy rsync; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2015: checking for $ac_word" >&5
echo "configure:2088: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -2351,6 +2424,7 @@ s%@CXX@%$CXX%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@STRIP@%$STRIP%g
s%@EXEEXT@%$EXEEXT%g
s%@ELVIN_CONFIG@%$ELVIN_CONFIG%g
s%@JAVAC@%$JAVAC%g
s%@JAR@%$JAR%g
......@@ -2463,7 +2537,6 @@ s%@BRAINSTEM_DIR@%$BRAINSTEM_DIR%g
s%@OPT_CFLAGS@%$OPT_CFLAGS%g
s%@EVENTSYS@%$EVENTSYS%g
s%@WINSUPPORT@%$WINSUPPORT%g
s%@EXE_SUFFIX@%$EXE_SUFFIX%g
s%@HAVE_ULXMLRPCPP@%$HAVE_ULXMLRPCPP%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@HAVE_MEZZANINE@%$HAVE_MEZZANINE%g
......
......@@ -49,6 +49,8 @@ AC_CHECK_TOOL(AR,ar)
AC_CHECK_TOOL(RANLIB,ranlib)
AC_CHECK_TOOL(STRIP,strip)
AC_EXEEXT
AC_PATH_PROG(ELVIN_CONFIG,elvin-config)
AC_PATH_PROG(JAVAC,javac)
AC_PATH_PROG(JAR,jar)
......@@ -555,23 +557,6 @@ else
fi
AC_SUBST(WINSUPPORT)
#
# Enable Windows Client support.
# Right now this means we are building the client software under CygWin.
# You should also turn on --enable-windows.
# Off by default.
#
AC_ARG_ENABLE(windowsclient,
[ --enable-windowsclient Enable Windows XP client support (requires third-party software)])
if test "$enable_windowsclient" = "yes"; then
# This is needed in strip and install actions.
EXE_SUFFIX=".exe";
else
EXE_SUFFIX="";
fi
AC_SUBST(EXE_SUFFIX)
#
# Check for ulsshxmlrpc header
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment