configury: allow libusb-less hidapi for macosx.
authorOzkan Sezer <sezeroz@gmail.com>
Thu, 01 Aug 2019 17:41:40 +0300
changeset 12978d2e027c5a389
parent 12976 07104eac00fb
child 12979 bbbb30026158
configury: allow libusb-less hidapi for macosx.
configure
configure.ac
     1.1 --- a/configure	Wed Jul 31 23:37:02 2019 +0300
     1.2 +++ b/configure	Thu Aug 01 17:41:40 2019 +0300
     1.3 @@ -24221,6 +24221,12 @@
     1.4              CFLAGS="$save_CFLAGS"
     1.5              if test x$have_libusb_h = xyes; then
     1.6                  hidapi_support=yes
     1.7 +            elif test x$onlylibusb = xno; then
     1.8 +                case "$host" in
     1.9 +                *-*-darwin* )
    1.10 +                    hidapi_support=yes
    1.11 +                    ;;
    1.12 +                esac
    1.13              fi
    1.14          fi
    1.15  
    1.16 @@ -24236,6 +24242,12 @@
    1.17                  if test x$onlylibusb = xyes; then
    1.18                      SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
    1.19                      EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
    1.20 +                elif test x$have_libusb_h != xyes ; then
    1.21 +                    case "$host" in
    1.22 +                    *-*-darwin* )
    1.23 +                        SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
    1.24 +                        ;;
    1.25 +                    esac
    1.26                  else
    1.27                      if test x$have_loadso != xyes; then
    1.28                          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic libusb loading" >&5
     2.1 --- a/configure.ac	Wed Jul 31 23:37:02 2019 +0300
     2.2 +++ b/configure.ac	Thu Aug 01 17:41:40 2019 +0300
     2.3 @@ -3236,6 +3236,12 @@
     2.4              CFLAGS="$save_CFLAGS"
     2.5              if test x$have_libusb_h = xyes; then
     2.6                  hidapi_support=yes
     2.7 +            elif test x$onlylibusb = xno; then
     2.8 +                case "$host" in
     2.9 +                *-*-darwin* )
    2.10 +                    hidapi_support=yes
    2.11 +                    ;;
    2.12 +                esac
    2.13              fi
    2.14          fi
    2.15  
    2.16 @@ -3249,6 +3255,12 @@
    2.17                  if test x$onlylibusb = xyes; then
    2.18                      SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
    2.19                      EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
    2.20 +                elif test x$have_libusb_h != xyes ; then
    2.21 +                    case "$host" in
    2.22 +                    *-*-darwin* )
    2.23 +                        SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
    2.24 +                        ;;
    2.25 +                    esac
    2.26                  else
    2.27                      if test x$have_loadso != xyes; then
    2.28                          AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libusb loading])