diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-29 20:08:13 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-29 20:08:13 +0000 |
| commit | 110dbb673e83af7fc7c7248fcf5f0e4383c04303 (patch) | |
| tree | 7918b11555602b7a84a9ffe72971bd1f8f077ae9 | |
| parent | bd2cb095aa686c3bf0f662c0029687645142ea9e (diff) | |
Final modifications to Autotools build system to work alongside CMake build system. CMake build system will only allow out-of-source building now. Removed all old NMake Makefiles for Windows to focus on use of CMake on Windows (it's not as important to require the old system on Windows like it is on *nix).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1878 5417fbe8-f217-4b02-8779-1006273d7864
| -rw-r--r-- | CMakeLists.txt | 11 | ||||
| -rwxr-xr-x | Config | 25 | ||||
| -rw-r--r-- | Makefile.win32 | 96 | ||||
| -rw-r--r-- | aclocal.m4 | 56 | ||||
| -rw-r--r-- | anope.m4 | 56 | ||||
| -rwxr-xr-x | configure | 1607 | ||||
| -rw-r--r-- | configure.in | 4 | ||||
| -rw-r--r-- | include/Makefile | 4 | ||||
| -rw-r--r-- | include/makefile.win32 | 25 | ||||
| -rw-r--r-- | include/sysconf.h.in | 238 | ||||
| -rw-r--r-- | include/sysconf.h.win32 | 43 | ||||
| -rw-r--r-- | install-sh (renamed from install.sh) | 0 | ||||
| -rw-r--r-- | lang/Makefile | 26 | ||||
| -rw-r--r-- | lang/Makefile.win32 | 75 | ||||
| -rw-r--r-- | makefile.inc.win32 | 18 | ||||
| -rwxr-xr-x | run-cc.pl | 17 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/Makefile | 4 | ||||
| -rw-r--r-- | src/core/Makefile.win32 | 24 | ||||
| -rw-r--r-- | src/makefile.win32 | 117 | ||||
| -rw-r--r-- | src/modules/makefile.inc.win32 | 2 | ||||
| -rw-r--r-- | src/modules/makefile.sub.win32 | 19 | ||||
| -rw-r--r-- | src/modules/makefile.win32 | 41 | ||||
| -rw-r--r-- | src/protocol/Makefile.win32 | 29 | ||||
| -rw-r--r-- | src/tools/Makefile | 2 | ||||
| -rw-r--r-- | src/tools/Makefile.win32 | 29 | ||||
| -rw-r--r-- | src/win32.rc.template | 90 |
27 files changed, 355 insertions, 2307 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a56c1d4f6..8b3d6c544 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,11 @@ if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) +# If the Source dir and the Binary dir are the same, we are building in-source, which we will disallow due to Autotools being there (but only on non-Windows) +if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32) + message(FATAL_ERROR "You can not use CMake to build Anope from the root of it's source tree! Remove the CMakeCache.txt file from this directory, then create a separate directory (either below this directory or elsewhere), and then re-run CMake from there.") +endif(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32) + # Detect is we are using CMake 2.6 or better, these versions include functions that require less work than CMake 2.4 does if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) set(CMAKE26_OR_BETTER TRUE) @@ -286,9 +291,9 @@ find_program(PERL perl) # If perl is included on the system and the user wants to use run-cc.pl, change the commands for compiling and linking if(PERL AND USE_RUN_CC_PL) - set(CMAKE_CXX_COMPILE_OBJECT "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl ${CMAKE_CXX_COMPILE_OBJECT}") - set(CMAKE_CXX_LINK_EXECUTABLE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl ${CMAKE_CXX_LINK_EXECUTABLE}") - set(CMAKE_CXX_CREATE_SHARED_MODULE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl ${CMAKE_CXX_CREATE_SHARED_MODULE}") + set(CMAKE_CXX_COMPILE_OBJECT "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_COMPILE_OBJECT}") + set(CMAKE_CXX_LINK_EXECUTABLE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_LINK_EXECUTABLE}") + set(CMAKE_CXX_CREATE_SHARED_MODULE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_CREATE_SHARED_MODULE}") endif(PERL AND USE_RUN_CC_PL) # If a INSTDIR was passed in to CMake, use it as the install prefix, otherwise set the default install prefix to the services directory under the user's home directory @@ -44,9 +44,9 @@ Run_Build_System () { RUN_CC_PL="" GEN_TYPE="" - if [ "$INSTDEST" != "" ] ; then + if [ "$INSTDIR" != "" ] ; then if [ "$BUILD_SYSTEM" = "cmake" ] ; then - WITH_INST="-DINSTDIR:STRING=$INSTDEST" + WITH_INST="-DINSTDIR:STRING=$INSTDIR" else WITH_INST="--with-instdir=$INSTDIR" fi @@ -84,7 +84,10 @@ Run_Build_System () { if [ "$BUILD_SYSTEM" = "cmake" ] ; then RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=ON" else - RUN_CC_PL="--with-makebin=run-cc.pl" + pwdsave=`pwd` + cd "`dirname $SOURCE_DIR/run-cc.pl`" + RUN_CC_PL="--with-makebin=`pwd`/run-cc.pl" + cd "$pwdsave" fi else if [ "$BUILD_SYSTEM" = "cmake" ] ; then @@ -132,10 +135,10 @@ export ECHO2 ECHO2SUF ########################################################################### BUILD_SYSTEM="cmake" -INSTDEST=$HOME/services +INSTDIR=$HOME/services RUNGROUP= UMASK= -DEBUG="no" +DEBUG="yes" USE_RUN_CC_PL="no" CAN_QUICK="no" SOURCE_DIR=`dirname $0` @@ -209,7 +212,7 @@ export ok INPUT ok=0 echo "Note: press Return for the default, or enter a new value." echo "Are you using configure or cmake?" -while [ $ok -qe 0 ] ; do +while [ $ok -eq 0 ] ; do echo2 "[$BUILD_SYSTEM] " if read INPUT ; then : ; else echo "" ; exit 1 ; fi if [ ! "$INPUT" ] ; then @@ -228,14 +231,16 @@ while [ $ok -qe 0 ] ; do ;; esac done +BUILD_SYSTEM=$INPUT +echo "" ok=0 echo "In what directory do you want the binaries to be installed?" while [ $ok -eq 0 ] ; do - echo2 "[$INSTDEST] " + echo2 "[$INSTDIR] " if read INPUT ; then : ; else echo "" ; exit 1 ; fi if [ ! "$INPUT" ] ; then - INPUT=$INSTDEST + INPUT=$INSTDIR fi if [ ! -d "$INPUT" ] ; then if exists "$INPUT" ; then @@ -256,7 +261,7 @@ while [ $ok -eq 0 ] ; do ok=1 fi done -INSTDEST=$INPUT +INSTDIR=$INPUT echo "" @@ -366,7 +371,7 @@ echo2 "Saving configuration results in config.cache... " cat <<EOT >$SOURCE_DIR/config.cache BUILD_SYSTEM="$BUILD_SYSTEM" -INSTDEST="$INSTDEST" +INSTDIR="$INSTDIR" RUNGROUP="$RUNGROUP" UMASK=$UMASK DEBUG="$DEBUG" diff --git a/Makefile.win32 b/Makefile.win32 deleted file mode 100644 index a6dfe119b..000000000 --- a/Makefile.win32 +++ /dev/null @@ -1,96 +0,0 @@ -# Makefile for Anope. -# -# (C) 2003-2008 Anope Team -# Contact us at info@anope.org -# -# This program is free but copyrighted software; see the file COPYING for -# details. -# -# Based on the original code of Epona by Lara. -# Based on the original code of Services by Andy Church. - -include Makefile.inc.win32 - -########################################################################### - -all: src core protocols languages tools modules install - -src: include\version.h include\sysconf.h include\language.h include\sysconf.h - cd src && $(MAKE) && cd .. - -install: - -@mkdir $(DATDEST)\backups - -@mkdir $(DATDEST)\logs - -@mkdir $(DATDEST)\languages - cd lang && $(MAKE) install && cd .. - cd src && $(MAKE) install && cd .. - cd src\modules && $(MAKE) install && cd .. - cd src\modules && $(MAKE) subs-install && cd .. - cd src\protocol && $(MAKE) install && cd .. - cd src\core && $(MAKE) install && cd .. - cd src\tools && $(MAKE) install && cd .. - -@echo --- - -@echo Anope has been installed successfully! - -@echo See docs\INSTALL for details on how to configure Anope for use. - -@echo --- - -spotless: - cd lang && $(MAKE) spotless && cd .. - cd src && $(MAKE) spotless && cd .. - cd src\modules && $(MAKE) spotless && cd ..\.. - cd src\protocol && $(MAKE) spotless && cd ..\.. - cd src\core && $(MAKE) spotless && cd ..\.. - cd src\tools && $(MAKE) spotless && cd ..\.. - -@erase include\language.h include\version.h *.manifest *~ anope.exe version.sh.exe *.obj anopesmtp.exe - -@echo -- - -@echo NOTICE: - -@echo You will need to run cscript /nologo install.js again - -@echo -- - -mypasql: - $(MYPASQL_BUILD) - -distclean: spotless - -clean: spotless - -########################################################################### - - -languages: FRC - cd lang && $(MAKE) && cd .. - -tools: FRC - cd src\tools && $(MAKE) && cd ..\.. - -core: FRC - cd src\core && $(MAKE) && cd ..\.. - -protocols: FRC - cd src\protocol && $(MAKE) && cd ..\.. - -modules: FRC - cd src\modules && $(MAKE) && cd ..\.. - -########################################################################### - -include\sysconf.h: - copy include\sysconf.h.win32 include\sysconf.h - -lang\language.h: lang\Makefile lang\index - cd lang && $(MAKE) language.h && cd .. - -lang\index: - cd lang && $(MAKE) index && cd .. - -include\language.h: lang\language.h - cd lang && copy language.h ..\include\language.h && cd .. - -include\version.h: version.sh.exe version.log include\services.h include\pseudo.h include\messages.h - version.sh.exe - move version.h include\version.h - -version.sh.exe: - $(CC) $(BASE_CFLAGS) include\version.sh.c /link $(LFLAGS) - -FRC: diff --git a/aclocal.m4 b/aclocal.m4 index 0d17d95bd..c2a6ca0bb 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -835,29 +835,37 @@ dnl Check the size of several types and define a valid int16_t and int32_t. dnl AC_DEFUN(anope_CHECK_TYPE_SIZES, [dnl Check type sizes -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -if test "$ac_cv_sizeof_int" = 2 ; then - AC_CHECK_TYPE(int16_t, int) - AC_CHECK_TYPE(u_int16_t, unsigned int) -elif test "$ac_cv_sizeof_short" = 2 ; then - AC_CHECK_TYPE(int16_t, short) - AC_CHECK_TYPE(u_int16_t, unsigned short) -else - AC_MSG_ERROR([Cannot find a type with size of 16 bits]) -fi -if test "$ac_cv_sizeof_int" = 4 ; then - AC_CHECK_TYPE(int32_t, int) - AC_CHECK_TYPE(u_int32_t, unsigned int) -elif test "$ac_cv_sizeof_short" = 4 ; then - AC_CHECK_TYPE(int32_t, short) - AC_CHECK_TYPE(u_int32_t, unsigned short) -elif test "$ac_cv_sizeof_long" = 4 ; then - AC_CHECK_TYPE(int32_t, long) - AC_CHECK_TYPE(u_int32_t, unsigned long) -else - AC_MSG_ERROR([Cannot find a type with size of 32 bits]) -fi +dnl AC_CHECK_SIZEOF(short) +dnl AC_CHECK_SIZEOF(int) +dnl AC_CHECK_SIZEOF(long) +dnl if test "$ac_cv_sizeof_int" = 2 ; then +dnl AC_CHECK_TYPE(int16_t, int) +dnl AC_CHECK_TYPE(u_int16_t, unsigned int) +dnl elif test "$ac_cv_sizeof_short" = 2 ; then +dnl AC_CHECK_TYPE(int16_t, short) +dnl AC_CHECK_TYPE(u_int16_t, unsigned short) +dnl else +dnl AC_MSG_ERROR([Cannot find a type with size of 16 bits]) +dnl fi +dnl if test "$ac_cv_sizeof_int" = 4 ; then +dnl AC_CHECK_TYPE(int32_t, int) +dnl AC_CHECK_TYPE(u_int32_t, unsigned int) +dnl elif test "$ac_cv_sizeof_short" = 4 ; then +dnl AC_CHECK_TYPE(int32_t, short) +dnl AC_CHECK_TYPE(u_int32_t, unsigned short) +dnl elif test "$ac_cv_sizeof_long" = 4 ; then +dnl AC_CHECK_TYPE(int32_t, long) +dnl AC_CHECK_TYPE(u_int32_t, unsigned long) +dnl else +dnl AC_MSG_ERROR([Cannot find a type with size of 32 bits]) +dnl fi +AC_CHECK_TYPE(uint8_t, AC_DEFINE(HAVE_UINT8_T, 1, "Has uint8_t type")) +AC_CHECK_TYPE(u_int8_t, AC_DEFINE(HAVE_U_INT8_T, 1, "Has u_int8_t type")) +AC_CHECK_TYPE(int16_t, AC_DEFINE(HAVE_INT16_T, 1, "Has int16_t type")) +AC_CHECK_TYPE(uint16_t, AC_DEFINE(HAVE_UINT16_T, 1, "Has uint16_t type")) +AC_CHECK_TYPE(u_int16_t, AC_DEFINE(HAVE_U_INT16_T, 1, "Has u_int16_t type")) +AC_CHECK_TYPE(int32_t, AC_DEFINE(HAVE_INT32_T, 1, "Has int32_t type")) +AC_CHECK_TYPE(uint32_t, AC_DEFINE(HAVE_UINT32_T, 1, "Has uint32_t type")) +AC_CHECK_TYPE(u_int32_t, AC_DEFINE(HAVE_U_INT32_T, 1, "Has u_int32_t type")) ]) @@ -4,28 +4,36 @@ dnl Check the size of several types and define a valid int16_t and int32_t. dnl AC_DEFUN(anope_CHECK_TYPE_SIZES, [dnl Check type sizes -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -if test "$ac_cv_sizeof_int" = 2 ; then - AC_CHECK_TYPE(int16_t, int) - AC_CHECK_TYPE(u_int16_t, unsigned int) -elif test "$ac_cv_sizeof_short" = 2 ; then - AC_CHECK_TYPE(int16_t, short) - AC_CHECK_TYPE(u_int16_t, unsigned short) -else - AC_MSG_ERROR([Cannot find a type with size of 16 bits]) -fi -if test "$ac_cv_sizeof_int" = 4 ; then - AC_CHECK_TYPE(int32_t, int) - AC_CHECK_TYPE(u_int32_t, unsigned int) -elif test "$ac_cv_sizeof_short" = 4 ; then - AC_CHECK_TYPE(int32_t, short) - AC_CHECK_TYPE(u_int32_t, unsigned short) -elif test "$ac_cv_sizeof_long" = 4 ; then - AC_CHECK_TYPE(int32_t, long) - AC_CHECK_TYPE(u_int32_t, unsigned long) -else - AC_MSG_ERROR([Cannot find a type with size of 32 bits]) -fi +dnl AC_CHECK_SIZEOF(short) +dnl AC_CHECK_SIZEOF(int) +dnl AC_CHECK_SIZEOF(long) +dnl if test "$ac_cv_sizeof_int" = 2 ; then +dnl AC_CHECK_TYPE(int16_t, int) +dnl AC_CHECK_TYPE(u_int16_t, unsigned int) +dnl elif test "$ac_cv_sizeof_short" = 2 ; then +dnl AC_CHECK_TYPE(int16_t, short) +dnl AC_CHECK_TYPE(u_int16_t, unsigned short) +dnl else +dnl AC_MSG_ERROR([Cannot find a type with size of 16 bits]) +dnl fi +dnl if test "$ac_cv_sizeof_int" = 4 ; then +dnl AC_CHECK_TYPE(int32_t, int) +dnl AC_CHECK_TYPE(u_int32_t, unsigned int) +dnl elif test "$ac_cv_sizeof_short" = 4 ; then +dnl AC_CHECK_TYPE(int32_t, short) +dnl AC_CHECK_TYPE(u_int32_t, unsigned short) +dnl elif test "$ac_cv_sizeof_long" = 4 ; then +dnl AC_CHECK_TYPE(int32_t, long) +dnl AC_CHECK_TYPE(u_int32_t, unsigned long) +dnl else +dnl AC_MSG_ERROR([Cannot find a type with size of 32 bits]) +dnl fi +AC_CHECK_TYPE(uint8_t, AC_DEFINE(HAVE_UINT8_T, 1, "Has uint8_t type")) +AC_CHECK_TYPE(u_int8_t, AC_DEFINE(HAVE_U_INT8_T, 1, "Has u_int8_t type")) +AC_CHECK_TYPE(int16_t, AC_DEFINE(HAVE_INT16_T, 1, "Has int16_t type")) +AC_CHECK_TYPE(uint16_t, AC_DEFINE(HAVE_UINT16_T, 1, "Has uint16_t type")) +AC_CHECK_TYPE(u_int16_t, AC_DEFINE(HAVE_U_INT16_T, 1, "Has u_int16_t type")) +AC_CHECK_TYPE(int32_t, AC_DEFINE(HAVE_INT32_T, 1, "Has int32_t type")) +AC_CHECK_TYPE(uint32_t, AC_DEFINE(HAVE_UINT32_T, 1, "Has uint32_t type")) +AC_CHECK_TYPE(u_int32_t, AC_DEFINE(HAVE_U_INT32_T, 1, "Has u_int32_t type")) ]) @@ -4615,17 +4615,12 @@ fi MODULEFLAGS=$ac_cv_pic -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if test "${ac_cv_sizeof_short+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking for uint8_t" >&5 +$as_echo_n "checking for uint8_t... " >&6; } +if test "${ac_cv_type_uint8_t+set}" = set; then $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. + ac_cv_type_uint8_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4636,201 +4631,8 @@ $ac_includes_default int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; -test_array [0] = 0 - +if (sizeof (uint8_t)) + return 0; ; return 0; } @@ -4853,29 +4655,6 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_short=0 - fi ;; -esac -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4883,245 +4662,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -static long int longval () { return (long int) (sizeof (short)); } -static unsigned long int ulongval () { return (long int) (sizeof (short)); } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (short))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (short)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (short)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_short=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; -test_array [0] = 0 - +if (sizeof ((uint8_t))) + return 0; ; return 0; } @@ -5144,198 +4689,40 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break + : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_cv_type_uint8_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
