Changeset 20905

Show
Ignore:
Timestamp:
11/08/07 17:38:32 (1 year ago)
Author:
patrick
Message:

Rework the logic for determining when to use Cocoa and when to use X11 on
Mac OS X. The previous approach required that X11 be installed even when the
user wanted to use Cocoa.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/gadgeteer/configure.ac

    r20577 r20905  
    174174          [AC_MSG_ERROR([*** GMTL required for Gadgeteer ***])]) 
    175175 
    176 AC_PATH_XTRA 
    177  
    178176gadget_use_x11='no' 
    179177gadget_use_cocoa='no' 
    180178 
    181 if test "x$have_x" = "xyes" ; then 
    182    AH_TEMPLATE([GADGET_USE_X11], [Define if the X Window System will be used]) 
    183  
    184    if test "x$PLATFORM" = "xDarwin" ; then 
    185       if test "x$XWIN_UI" = "xyes" ; then 
     179AH_TEMPLATE([GADGET_USE_X11], [Define if the X Window System will be used]) 
     180 
     181if test "x$PLATFORM" = "xDarwin" ; then 
     182   if test "x$XWIN_UI" = "xyes" ; then 
     183      AC_PATH_XTRA 
     184 
     185      if test "x$have_x" = "xyes" ; then 
    186186         gadget_use_x11='yes' 
    187187         AC_DEFINE([GADGET_USE_X11],) 
     188      # If --enable-xwindows was passed on the command line but X11 was not 
     189      # found, then we have a problem. 
    188190      else 
    189          gadget_use_cocoa='yes' 
    190          AC_DEFINE([GADGET_USE_COCOA], , [Define if Cocoa will be used]) 
     191         AC_MSG_ERROR([*** Use of the X Window System requested, but it was not found ***]) 
    191192      fi 
    192    elif test "x$OS_TYPE" = "xUNIX" ; then 
     193   else 
     194      gadget_use_cocoa='yes' 
     195      AC_DEFINE([GADGET_USE_COCOA], , [Define if Cocoa will be used]) 
     196   fi 
     197elif test "x$OS_TYPE" = "xUNIX" ; then 
     198   AC_PATH_XTRA 
     199 
     200   if test "x$have_x" = "xyes" ; then 
    193201      gadget_use_x11='yes' 
    194202      AC_DEFINE([GADGET_USE_X11],) 
     203   else 
     204      AC_MSG_ERROR([*** Use of the X Window System is required ***]) 
    195205   fi 
    196 # If --enable-xwindows was passed on the command line but X11 was not found, 
    197 # then we have a problem. 
    198 elif test "x$XWIN_UI" = "xyes" ; then 
    199    AC_MSG_ERROR([*** Use of the X Window System requested, but it was not found ***]) 
    200206fi 
    201207