Rework parallel port configure script option handling:
- Move AC_ARG_ENABLE for secondary parallel port options: - These macros cause their configure options to appear unconditionally, so they should not be placed inside conditional logic. - Groups them with primary parallel port driver option. - Update these options to show '-' instead of '_'; both still work. - Update command help text to show host architecture/OS requirements. - Display a warning when these options have been provided and the configure script will ignore the setting that the user specified. git-svn-id: svn://svn.berlios.de/openocd/trunk@2104 b42882b7-edfa-0310-969c-e2dbd0fdcd60__archive__
parent
1419a72892
commit
35f7c4e478
61
configure.in
61
configure.in
|
@ -283,25 +283,24 @@ if test $debug_malloc = yes; then
|
|||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE(dummy,
|
||||
AS_HELP_STRING([--enable-dummy], [Enable building the dummy port driver]),
|
||||
[build_dummy=$enableval], [build_dummy=no])
|
||||
|
||||
AC_ARG_ENABLE(parport,
|
||||
AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]),
|
||||
[build_parport=$enableval], [build_parport=no])
|
||||
|
||||
AC_ARG_ENABLE(dummy,
|
||||
AS_HELP_STRING([--enable-dummy], [Enable building the dummy port driver]),
|
||||
[build_dummy=$enableval], [build_dummy=no])
|
||||
|
||||
case "${host_cpu}" in
|
||||
i?86|x86*)
|
||||
AC_ARG_ENABLE(parport_ppdev,
|
||||
AS_HELP_STRING([--enable-parport_ppdev], [Enable use of ppdev (/dev/parportN) for parport]),
|
||||
[parport_use_ppdev=$enableval], [parport_use_ppdev=no])
|
||||
;;
|
||||
*)
|
||||
parport_use_ppdev=yes
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE(parport_ppdev,
|
||||
AS_HELP_STRING([--disable-parport-ppdev],
|
||||
[Disable use of ppdev (/dev/parportN) for parport (for x86 only)]),
|
||||
[parport_use_ppdev=$enableval], [parport_use_ppdev=])
|
||||
|
||||
AC_ARG_ENABLE(parport_giveio,
|
||||
AS_HELP_STRING([--enable-parport-giveio],
|
||||
[Enable use of giveio for parport (for CygWin only)]),
|
||||
[parport_use_giveio=$enableval], [parport_use_giveio=])
|
||||
|
||||
AC_ARG_ENABLE(ft2232_libftdi,
|
||||
AS_HELP_STRING([--enable-ft2232_libftdi], [Enable building support for FT2232 based devices using the libftdi driver, opensource alternate of FTD2XX]),
|
||||
[build_ft2232_libftdi=$enableval], [build_ft2232_libftdi=no])
|
||||
|
@ -423,18 +422,27 @@ else
|
|||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
case "${host_cpu}" in
|
||||
i?86|x86*)
|
||||
;;
|
||||
*)
|
||||
if test x$parport_use_ppdev = xno; then
|
||||
AC_MSG_WARN([--disable-parport-ppdev is not supported by the host CPU])
|
||||
fi
|
||||
parport_use_ppdev=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
case $host in
|
||||
*-cygwin*)
|
||||
is_win32=yes
|
||||
|
||||
AC_ARG_ENABLE(parport_giveio,
|
||||
AS_HELP_STRING([--enable-parport_giveio], [Enable use of giveio for parport instead of ioperm]),
|
||||
[parport_use_giveio=$enableval], [parport_use_giveio=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
|
||||
AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
|
||||
fi
|
||||
parport_use_giveio=yes
|
||||
is_cygwin=no
|
||||
else
|
||||
|
@ -449,6 +457,9 @@ case $host in
|
|||
is_mingw=yes
|
||||
is_win32=yes
|
||||
|
||||
if test x$parport_use_giveio = xno; then
|
||||
AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
|
||||
fi
|
||||
parport_use_giveio=yes
|
||||
|
||||
AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
|
||||
|
@ -458,6 +469,9 @@ case $host in
|
|||
*darwin*)
|
||||
is_darwin=yes
|
||||
|
||||
if test x$parport_use_giveio = xyes; then
|
||||
AC_MSG_WARN([--enable-parport-giveio cannot be used by Darwin hosts])
|
||||
fi
|
||||
parport_use_giveio=no
|
||||
|
||||
AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
|
||||
|
@ -465,7 +479,10 @@ case $host in
|
|||
AC_DEFINE(IS_DARWIN, 1, [1 if building for Darwin.])
|
||||
;;
|
||||
*)
|
||||
parport_use_giveio=no
|
||||
if test x$parport_use_giveio = xyes; then
|
||||
AC_MSG_WARN([--enable-parport-giveio cannot be used by ]$host[ hosts])
|
||||
fi
|
||||
parport_use_giveio=no
|
||||
AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
|
||||
AC_DEFINE(IS_WIN32, 0, [0 if not building for Win32.])
|
||||
AC_DEFINE(IS_DARWIN, 0, [0 if not building for Darwin.])
|
||||
|
@ -518,13 +535,13 @@ else
|
|||
AC_DEFINE(BUILD_AT91RM9200, 0, [0 if you don't want at91rm9200.])
|
||||
fi
|
||||
|
||||
if test $parport_use_ppdev = yes; then
|
||||
if test x$parport_use_ppdev = xyes; then
|
||||
AC_DEFINE(PARPORT_USE_PPDEV, 1, [1 if you want parport to use ppdev.])
|
||||
else
|
||||
AC_DEFINE(PARPORT_USE_PPDEV, 0, [0 if you don't want parport to use ppdev.])
|
||||
fi
|
||||
|
||||
if test $parport_use_giveio = yes; then
|
||||
if test x$parport_use_giveio = xyes; then
|
||||
AC_DEFINE(PARPORT_USE_GIVEIO, 1, [1 if you want parport to use giveio.])
|
||||
else
|
||||
AC_DEFINE(PARPORT_USE_GIVEIO, 0, [0 if you don't want parport to use giveio.])
|
||||
|
@ -872,7 +889,7 @@ AM_MAINTAINER_MODE
|
|||
AM_CONDITIONAL(RELEASE, test $build_release = yes)
|
||||
AM_CONDITIONAL(PARPORT, test $build_parport = yes)
|
||||
AM_CONDITIONAL(DUMMY, test $build_dummy = yes)
|
||||
AM_CONDITIONAL(GIVEIO, test $parport_use_giveio = yes)
|
||||
AM_CONDITIONAL(GIVEIO, test x$parport_use_giveio = xyes)
|
||||
AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes)
|
||||
AM_CONDITIONAL(ECOSBOARD, test $build_ecosboard = yes)
|
||||
AM_CONDITIONAL(IOUTIL, test $build_ioutil = yes)
|
||||
|
|
Loading…
Reference in New Issue