configure.ac
changeset 12978 d2e027c5a389
parent 12974 0fef4b21fa1d
child 12984 774ceeac9335
equal deleted inserted replaced
12976:07104eac00fb 12978:d2e027c5a389
  3234             CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
  3234             CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
  3235             AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
  3235             AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
  3236             CFLAGS="$save_CFLAGS"
  3236             CFLAGS="$save_CFLAGS"
  3237             if test x$have_libusb_h = xyes; then
  3237             if test x$have_libusb_h = xyes; then
  3238                 hidapi_support=yes
  3238                 hidapi_support=yes
       
  3239             elif test x$onlylibusb = xno; then
       
  3240                 case "$host" in
       
  3241                 *-*-darwin* )
       
  3242                     hidapi_support=yes
       
  3243                     ;;
       
  3244                 esac
  3239             fi
  3245             fi
  3240         fi
  3246         fi
  3241 
  3247 
  3242         if test x$hidapi_support = xyes; then
  3248         if test x$hidapi_support = xyes; then
  3243             AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
  3249             AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
  3247             if test x$skiplibusb = xno; then
  3253             if test x$skiplibusb = xno; then
  3248                 EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
  3254                 EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
  3249                 if test x$onlylibusb = xyes; then
  3255                 if test x$onlylibusb = xyes; then
  3250                     SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
  3256                     SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
  3251                     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
  3257                     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
       
  3258                 elif test x$have_libusb_h != xyes ; then
       
  3259                     case "$host" in
       
  3260                     *-*-darwin* )
       
  3261                         SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
       
  3262                         ;;
       
  3263                     esac
  3252                 else
  3264                 else
  3253                     if test x$have_loadso != xyes; then
  3265                     if test x$have_loadso != xyes; then
  3254                         AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libusb loading])
  3266                         AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libusb loading])
  3255                     fi
  3267                     fi
  3256                     SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
  3268                     SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"