X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=configure.ac;h=36058466bb53373b7cec52ca93c6673352b6b527;hp=13d25591f7f872c9946a14ddbf092b6a0f1278ce;hb=1d7176f50bc7d5971a82977ac2baa79eef521c21;hpb=84281d711ea8b8d4d2791ff03915b5607c7b6cd4 diff --git a/configure.ac b/configure.ac index 13d25591f7..36058466bb 100644 --- a/configure.ac +++ b/configure.ac @@ -5,6 +5,14 @@ AC_CONFIG_SRCDIR([src/openocd.c]) m4_include([config_subdir.m4])dnl +# check for makeinfo before calling AM_INIT_AUTOMAKE +AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo]) +if test "x$MAKEINFO" = "x"; then + MAKEINFO='echo makeinfo missing; true' + AC_MSG_WARN([Info documentation will not be built.]) +fi +AC_SUBST([MAKEINFO]) + AM_INIT_AUTOMAKE([-Wall -Wno-portability dist-bzip2 dist-zip subdir-objects]) AC_CONFIG_HEADERS([config.h]) @@ -615,6 +623,10 @@ case $host in ;; esac +if test $is_win32 = yes; then + AC_DEFINE([WIN32_LEAN_AND_MEAN], [1], [1 to exclude old conflicting definitions when building on Windows]) +fi + if test $build_parport = yes; then build_bitbang=yes AC_DEFINE([BUILD_PARPORT], [1], [1 if you want parport.]) @@ -1248,47 +1260,6 @@ if test $gcc_warnings = yes; then CFLAGS="$CFLAGS $GCC_WARNINGS" fi -# Setup for compiling build tools -AC_MSG_CHECKING([for a C compiler for build tools]) -if test $cross_compiling = yes; then - AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) - CFLAGS_FOR_BUILD="-g -O2 $GCC_WARNINGS" -else - CC_FOR_BUILD=$CC - CFLAGS_FOR_BUILD=$CFLAGS -fi - -AC_MSG_RESULT([$CC_FOR_BUILD]) -AC_SUBST([CC_FOR_BUILD]) -AC_SUBST([CFLAGS_FOR_BUILD]) - -AC_MSG_CHECKING([for suffix of executable build tools]) -if test $cross_compiling = yes; then - cat >conftest.c <<\_______EOF -int main () -{ - exit (0); -} -_______EOF - for i in .exe ""; do - compile="$CC_FOR_BUILD conftest.c -o conftest$i" - if AC_TRY_EVAL(compile); then - if (./conftest) 2>&AC_FD_CC; then - EXEEXT_FOR_BUILD=$i - break - fi - fi - done - rm -f conftest* - if test "${EXEEXT_FOR_BUILD+set}" != set; then - AC_MSG_ERROR([Cannot determine suffix of executable build tools]) - fi -else - EXEEXT_FOR_BUILD=$EXEEXT -fi -AC_MSG_RESULT([$EXEEXT_FOR_BUILD]) -AC_SUBST([EXEEXT_FOR_BUILD]) - AC_CONFIG_FILES([ Makefile src/Makefile