Configure checks that char is signed

This commit is contained in:
Alfredo Beaumont 2004-04-17 21:39:30 +00:00
parent af28770632
commit b04737de72
2 changed files with 83 additions and 2 deletions

62
configure vendored
View file

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac Revision: 1.28 .
# From configure.ac Revision: 1.29 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for Battle for Wesnoth 0.7.3-CVS.
#
@ -3478,6 +3478,65 @@ fi
#######################################################################
# Checks for types. #
#######################################################################
echo "$as_me:$LINENO: checking if char is signed" >&5
echo $ECHO_N "checking if char is signed... $ECHO_C" >&6
#AC_COMPILE_IFELSE(
#[AC_LANG_SOURCE([
#int main(int argc, char **argv)
#{
#[[static int test_array [1 - 2 * !(((char) -1) < 0)];]],
# test_array [0] = 0;
# return 0;
#}
# ]],#)],
cat >conftest.$ac_ext <<_ACEOF
static int test_array [1 - 2 * !(((char) -1) < 0)];
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
{ { echo "$as_me:$LINENO: error: *** char is unsigned. Wesnoth cannot work with unsigned
chars. Try with another compiler (specify it using CXX environment variable.)" >&5
echo "$as_me: error: *** char is unsigned. Wesnoth cannot work with unsigned
chars. Try with another compiler (specify it using CXX environment variable.)" >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
#######################################################################
# Checks for libraries. #
#######################################################################
@ -3490,7 +3549,6 @@ LIBS="$LIBS $SDL_LIBS"
# it doesn't find it in FreeBSD
# AC_CHECK_LIB([SDL], [SDL_Init])
echo "$as_me:$LINENO: checking for IMG_Load in -lSDL_image" >&5
echo $ECHO_N "checking for IMG_Load in -lSDL_image... $ECHO_C" >&6
if test "${ac_cv_lib_SDL_image_IMG_Load+set}" = set; then

View file

@ -66,6 +66,29 @@ fi
AC_SUBST([KDE_DESKTOP])
AC_SUBST([KDE_ICON])
#######################################################################
# Checks for types. #
#######################################################################
AC_MSG_CHECKING([if char is signed])
#AC_COMPILE_IFELSE(
#[AC_LANG_SOURCE([
#int main(int argc, char **argv)
#{
#[[static int test_array [1 - 2 * !(((char) -1) < 0)];]],
# test_array [0] = 0;
# return 0;
#}
# ]],#)],
AC_COMPILE_IFELSE(
[[static int test_array [1 - 2 * !(((char) -1) < 0)];]],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)]
[AC_MSG_ERROR([*** char is unsigned. Wesnoth cannot work with unsigned
chars. Try with another compiler (specify it using CXX environment variable.)])])
#######################################################################
# Checks for libraries. #
#######################################################################