Adjust whitespace in configure script: use two spaces for indent.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2106 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
zwelch 2009-06-08 04:35:19 +00:00
parent 5ee0379be1
commit a221892f60

View File

@ -136,7 +136,7 @@ fi
AC_ARG_WITH(ftd2xx,
AS_HELP_STRING([--with-ftd2xx=<PATH>],[This option has been removed.]),
[
[
# Option Given.
cat << __EOF__
@ -148,7 +148,7 @@ On Linux, the new option is:
Where <path> is the path the the directory where the "tar.gz" file
from FTDICHIP.COM was unpacked, for example:
--with-ftd2xx-linux-tardir=/home/duane/libftd2xx-linux-tardir=/home/duane/libftd2xx0.4.16
--with-ftd2xx-linux-tardir=${HOME}/libftd2xx0.4.16
On Cygwin/MingW32, the new option is:
@ -157,17 +157,12 @@ On Cygwin/MingW32, the new option is:
Where <path> is the path to the directory where the "zip" file from
FTDICHIP.COM was unpacked, for example:
--with-ftd2xx-win32-zipdir=/home/duane/ftd2xx.cdm.files
--with-ftd2xx-win32-zipdir=${HOME}/ftd2xx.cdm.files
__EOF__
AC_MSG_ERROR([Sorry Cannot continue])
],
[
# Option not given
true
]
)
], [true])
#========================================
# FTD2XXX support comes in 4 forms.
@ -189,12 +184,7 @@ AC_ARG_WITH(ftd2xx-win32-zipdir,
else
AC_MSG_ERROR([Parameter to --with-ftd2xx-win32-zipdir is not a dir: $with_ftd2xx_win32_zipdir])
fi
],
[
# not given
true
]
)
], [true])
AC_ARG_WITH(ftd2xx-linux-tardir,
AS_HELP_STRING([--with-ftd2xx-linux-tardir], [Where (Linux/Unix) the tar file from ftdichip.com was unpacked <default=search>]),
@ -210,33 +200,27 @@ AC_ARG_WITH(ftd2xx-linux-tardir,
else
AC_MSG_ERROR([Parameter to --with-ftd2xx-linux-tardir is not a dir: $with_ftd2xx_linux_tardir])
fi
],
[
# Not given
true
]
)
], [true])
AC_ARG_WITH(ftd2xx-lib,
AS_HELP_STRING([--with-ftd2xx-lib], [Use static or shared ftd2xx libs on default static]),
[
case "$withval" in
static)
AS_HELP_STRING([--with-ftd2xx-lib],
[Use static or shared ftd2xx libs on default static]),
[
case "$withval" in
static)
with_ftd2xx_lib=$withval
;;
shared)
shared)
with_ftd2xx_lib=$withval
;;
*)
*)
AC_MSG_ERROR([Option: --with-ftd2xx-lib=static or --with-ftd2xx-lib=shared not, $withval])
;;
esac
],
[
esac
], [
# Default is static - it is simpler :-(
with_ftd2xx_lib=static
]
)
])
AC_ARG_ENABLE(gccwarnings,
AS_HELP_STRING([--disable-gccwarnings], [Disable compiler warnings]),
@ -463,7 +447,8 @@ case $host in
*-cygwin*)
is_win32=yes
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[return __MINGW32__;]),[is_mingw=yes],[is_mingw=no])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[return __MINGW32__;]),
[is_mingw=yes],[is_mingw=no])
if test $is_mingw = yes; then
AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
if test x$parport_use_giveio = xno; then
@ -668,7 +653,7 @@ then
fi
if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
AC_MSG_CHECKING([for ftd2xx.lib exists (win32)])
AC_MSG_CHECKING([for ftd2xx.lib exists (win32)])
# if we are given a zipdir...
if test "${with_ftd2xx_win32_zipdir+set}" = set
@ -704,7 +689,7 @@ AC_MSG_CHECKING([for ftd2xx.lib exists (win32)])
AC_MSG_WARN([ASSUMPTION: The (win32) FTDICHIP.COM files: ftd2xx.h and ftd2xx.lib are in a proper place])
fi
fi
fi
fi # win32
if test $is_darwin = yes ; then
if test "${with_ftd2xx_win32_zipdir+set}" = set
@ -728,7 +713,7 @@ if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
LIBS="$LIBS -lftd2xx"
AC_MSG_RESULT([-L/usr/local/lib -lftd2xx])
fi
fi
fi # darwin
if test $is_win32 = no && test $is_darwin = no ; then
@ -789,14 +774,14 @@ if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
],[])
fi
fi
fi
fi # linux
if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes; then
# Before we go any further - make sure we can *BUILD* and *RUN*
# a simple app with the "ftd2xx.lib" file - in what ever form we where given
# We should be able to compile, link and run this test program now
AC_MSG_CHECKING([whether ftd2xx library works])
AC_MSG_CHECKING([whether ftd2xx library works])
#
# Save the LDFLAGS for later..
@ -806,8 +791,8 @@ _LDFLAGS=`eval echo $LDFLAGS`
_CFLAGS=`eval echo $CFLAGS`
LDFLAGS=$_LDFLAGS
CFLAGS=$_CFLAGS
AC_RUN_IFELSE(
[
AC_RUN_IFELSE([
#include "confdefs.h"
#if IS_WIN32
#include "windows.h"
@ -822,13 +807,17 @@ main( int argc, char **argv )
FT_GetLibraryVersion( &x );
return 0;
}
], [ AC_MSG_RESULT([Success!])] , [ AC_MSG_ERROR([Cannot build & run test program using ftd2xx.lib]) ] )
], [
AC_MSG_RESULT([Success!])
], [
AC_MSG_ERROR([Cannot build & run test program using ftd2xx.lib])
] )
AC_MSG_CHECKING([whether to build ftd2xx device support])
AC_MSG_RESULT([$want_ftd2xx_highspeed])
if test $want_ftd2xx_highspeed != no; then
AC_MSG_CHECKING([for ftd2xx highspeed device support])
AC_COMPILE_IFELSE([
AC_MSG_CHECKING([for ftd2xx highspeed device support])
AC_COMPILE_IFELSE([
#include "confdefs.h"
#if IS_WIN32
#include "windows.h"
@ -836,15 +825,16 @@ AC_COMPILE_IFELSE([
#include <stdio.h>
#include <ftd2xx.h>
DWORD x = FT_DEVICE_4232H;
], [
AC_DEFINE(BUILD_FTD2XX_HIGHSPEED, [1], [Support FT2232H/FT4232HS with FTD2XX.])
], [
AC_DEFINE(BUILD_FTD2XX_HIGHSPEED, [1],
[Support FT2232H/FT4232HS with FTD2XX.])
build_ftd2xx_highspeed=yes
], [
], [
build_ftd2xx_highspeed=no
] )
AC_MSG_RESULT([$build_ftd2xx_highspeed])
])
AC_MSG_RESULT([$build_ftd2xx_highspeed])
if test $want_ftd2xx_highspeed = yes -a $build_ftd2xx_highspeed = no; then
if test $want_ftd2xx_highspeed = yes -a $build_ftd2xx_highspeed = no; then
AC_MSG_ERROR([You need a newer FTD2XX driver (version 0.4.16 or later).])
fi
fi
@ -861,15 +851,14 @@ if test $build_ft2232_libftdi = yes ; then
# Try to build a small program.
AC_MSG_CHECKING([Build & Link with libftdi...])
LDFLAGS_SAVE=$LDFLAGS
CFLAGS_SAVE=$CFLAGS
_LDFLAGS=`eval echo $LDFLAGS`
_CFLAGS=`eval echo $CFLAGS`
LDFLAGS=$_LDFLAGS
CFLAGS=$_CFLAGS
LDFLAGS_SAVE=$LDFLAGS
CFLAGS_SAVE=$CFLAGS
_LDFLAGS=`eval echo $LDFLAGS`
_CFLAGS=`eval echo $CFLAGS`
LDFLAGS=$_LDFLAGS
CFLAGS=$_CFLAGS
AC_RUN_IFELSE(
[
AC_RUN_IFELSE([
#include <stdio.h>
#include <ftdi.h>
@ -885,14 +874,14 @@ main( int argc, char **argv )
return 1;
}
}
]
,
[ AC_MSG_RESULT([Success]) ]
,
[ AC_MSG_ERROR([Cannot build & run test program using libftdi]) ] )
# Restore the 'unexpanded ldflags'
LDFLAGS=$LDFLAGS_SAVE
CFLAGS=$CFLAGS_SAVE
], [
AC_MSG_RESULT([Success])
], [
AC_MSG_ERROR([Cannot build & run test program using libftdi])
])
# Restore the 'unexpanded ldflags'
LDFLAGS=$LDFLAGS_SAVE
CFLAGS=$CFLAGS_SAVE
fi
# check for usb.h when a driver will require it
@ -1006,7 +995,7 @@ int main ()
exit (0);
}
_______EOF
for i in .exe ""; do
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
@ -1014,7 +1003,7 @@ for i in .exe ""; do
break
fi
fi
done
done
rm -f conftest*
if test "${EXEEXT_FOR_BUILD+set}" != set; then
AC_MSG_ERROR([Cannot determine suffix of executable build tools])
@ -1025,4 +1014,16 @@ fi
AC_MSG_RESULT([$EXEEXT_FOR_BUILD])
AC_SUBST(EXEEXT_FOR_BUILD)
AC_OUTPUT(Makefile src/Makefile src/helper/Makefile src/jtag/Makefile src/xsvf/Makefile src/svf/Makefile src/target/Makefile src/server/Makefile src/flash/Makefile src/pld/Makefile doc/Makefile)
AC_OUTPUT([
Makefile
src/Makefile
src/helper/Makefile
src/jtag/Makefile
src/xsvf/Makefile
src/svf/Makefile
src/target/Makefile
src/server/Makefile
src/flash/Makefile
src/pld/Makefile
doc/Makefile
])