Rework parallel port configure script option handling:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 8 Jun 2009 04:34:45 +0000 (04:34 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 8 Jun 2009 04:34:45 +0000 (04:34 +0000)
- 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

configure.in

index 7dbdebc6e78169d111e5a87ccfb11edab71d7ed2..affadd7ceec30d6daa6d13fbd83b8692221445ef 100644 (file)
@@ -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)

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)