[71210] trunk/dports/science/usrp/files/patch-configure-libusb.diff

michaelld at macports.org michaelld at macports.org
Sat Sep 4 07:39:58 PDT 2010


Revision: 71210
          http://trac.macports.org/changeset/71210
Author:   michaelld at macports.org
Date:     2010-09-04 07:39:54 -0700 (Sat, 04 Sep 2010)
Log Message:
-----------
Adding in missed file; patches GNU Radio's configure, such that when
looking for LIBUSB it checks to make sure the symbol "usb_debug" is
found in the library.

Added Paths:
-----------
    trunk/dports/science/usrp/files/patch-configure-libusb.diff

Added: trunk/dports/science/usrp/files/patch-configure-libusb.diff
===================================================================
--- trunk/dports/science/usrp/files/patch-configure-libusb.diff	                        (rev 0)
+++ trunk/dports/science/usrp/files/patch-configure-libusb.diff	2010-09-04 14:39:54 UTC (rev 71210)
@@ -0,0 +1,658 @@
+--- configure.orig	2010-08-27 15:32:50.000000000 -0400
++++ configure	2010-08-27 16:41:16.000000000 -0400
+@@ -24131,10 +24131,27 @@
+ 
+ 
+ 
+-  libusbok=no
+-  have_libusb1=no
+-  LIBUSB_PKG_CONFIG_NAME=''
++    saved_LDFLAGS=${LDFLAGS}
++  LDFLAGS=
++  LIBUSB_PKG_CONFIG_NAME=
++
++
++    libusb_list=''
+   if test x$req_libusb1 = xyes; then
++        libusb_list="libusb-1.0"
++  else
++        libusb_list="libusb libusb-legacy"
++  fi
++  for libusb_name in ${libusb_list}; do
++        libusbok=no
++    have_libusb1=no
++    usb_header=''
++    usb_lib_func=''
++    usb_lib_name=''
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: Checking for LIBUSB version '${libusb_name}'" >&5
++$as_echo "$as_me: Checking for LIBUSB version '${libusb_name}'" >&6;}
++    if test ${libusb_name} = "libusb-1.0"; then
+ 
+ 
+ 
+@@ -24147,12 +24164,12 @@
+         pkg_cv_USB_CFLAGS="$USB_CFLAGS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\${libusb_name}\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "${libusb_name}") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_USB_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0" 2>/dev/null`
++  pkg_cv_USB_CFLAGS=`$PKG_CONFIG --cflags "${libusb_name}" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -24168,12 +24185,12 @@
+         pkg_cv_USB_LIBS="$USB_LIBS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\${libusb_name}\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "${libusb_name}") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "libusb-1.0" 2>/dev/null`
++  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "${libusb_name}" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -24195,12 +24212,12 @@
+         pkg_cv_USB_LIBS="$USB_LIBS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\${libusb_name}\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "${libusb_name}") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "libusb-1.0" 2>/dev/null`
++  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "${libusb_name}" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -24215,12 +24232,12 @@
+         pkg_cv_USB_INCLUDEDIR="$USB_INCLUDEDIR"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\${libusb_name}\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "${libusb_name}") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_USB_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "libusb-1.0" 2>/dev/null`
++  pkg_cv_USB_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "${libusb_name}" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -24240,37 +24257,18 @@
+         _pkg_short_errors_supported=no
+ fi
+         if test $_pkg_short_errors_supported = yes; then
+-	        USB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libusb-1.0"`
++	        USB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "${libusb_name}"`
+         else
+-	        USB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libusb-1.0"`
++	        USB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "${libusb_name}"`
+         fi
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$USB_PKG_ERRORS" >&5
+ 
+-	as_fn_error "Package requirements (libusb-1.0) were not met:
+-
+-$USB_PKG_ERRORS
+-
+-Consider adjusting the PKG_CONFIG_PATH environment variable if you
+-installed software in a non-standard prefix.
+-
+-Alternatively, you may set the environment variables USB_CFLAGS
+-and USB_LIBS to avoid the need to call pkg-config.
+-See the pkg-config man page for more details.
+-" "$LINENO" 5
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++                libusbok=no
+ elif test $pkg_failed = untried; then
+-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
+-is in your PATH or set the PKG_CONFIG environment variable to the full
+-path to pkg-config.
+-
+-Alternatively, you may set the environment variables USB_CFLAGS
+-and USB_LIBS to avoid the need to call pkg-config.
+-See the pkg-config man page for more details.
+-
+-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+-See \`config.log' for more details." "$LINENO" 5; }
++	libusbok=no
+ else
+ 	USB_CFLAGS=$pkg_cv_USB_CFLAGS
+ 	USB_LIBS=$pkg_cv_USB_LIBS
+@@ -24288,16 +24286,13 @@
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 
+-      libusbok=yes
+-      have_libusb1=yes
+-      usb_header='libusb-1.0/libusb.h'
+-      usb_lib_func='libusb_bulk_transfer'
+-      usb_lib_name='usb-1.0'
+-      LIBUSB_PKG_CONFIG_NAME='libusb-1.0'
++        libusbok=yes
++        have_libusb1=yes
++        usb_header='libusb-1.0/libusb.h'
++        usb_lib_func='libusb_bulk_transfer'
+ 
+ fi
+-  else
+-
++    else
+ 
+ 
+ 
+@@ -24310,12 +24305,12 @@
+         pkg_cv_USB_CFLAGS="$USB_CFLAGS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\${libusb_name}\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "${libusb_name}") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_USB_CFLAGS=`$PKG_CONFIG --cflags "libusb" 2>/dev/null`
++  pkg_cv_USB_CFLAGS=`$PKG_CONFIG --cflags "${libusb_name}" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -24331,12 +24326,12 @@
+         pkg_cv_USB_LIBS="$USB_LIBS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\${libusb_name}\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "${libusb_name}") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "libusb" 2>/dev/null`
++  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "${libusb_name}" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -24358,12 +24353,12 @@
+         pkg_cv_USB_LIBS="$USB_LIBS"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\${libusb_name}\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "${libusb_name}") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "libusb" 2>/dev/null`
++  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "${libusb_name}" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -24378,12 +24373,12 @@
+         pkg_cv_USB_INCLUDEDIR="$USB_INCLUDEDIR"
+     else
+         if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\${libusb_name}\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "${libusb_name}") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_USB_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "libusb" 2>/dev/null`
++  pkg_cv_USB_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "${libusb_name}" 2>/dev/null`
+ else
+   pkg_failed=yes
+ fi
+@@ -24403,9 +24398,9 @@
+         _pkg_short_errors_supported=no
+ fi
+         if test $_pkg_short_errors_supported = yes; then
+-	        USB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libusb"`
++	        USB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "${libusb_name}"`
+         else
+-	        USB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libusb"`
++	        USB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "${libusb_name}"`
+         fi
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$USB_PKG_ERRORS" >&5
+@@ -24432,178 +24427,190 @@
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 
+-      libusbok=yes
+-      LIBUSB_PKG_CONFIG_NAME='libusb'
++        libusbok=yes
++        usb_header='usb.h'
++        usb_lib_func='usb_bulk_write'
+ 
+ fi
+-        if test $libusbok = no; then
++    fi
++    if test $libusbok = yes; then
+ 
++                                          ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
++      save_CPPFLAGS="$CPPFLAGS"
++      if test x$USB_INCLUDEDIR != x; then
++        USB_INCLUDES="-I$USB_INCLUDEDIR"
++        CPPFLAGS="$USB_INCLUDES"
++      fi
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking $libusb_name for header $usb_header" >&5
++$as_echo_n "checking $libusb_name for header $usb_header... " >&6; }
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-pkg_failed=no
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for USB" >&5
+-$as_echo_n "checking for USB... " >&6; }
++        #include "$usb_header"
+ 
+-if test -n "$PKG_CONFIG"; then
+-    if test -n "$USB_CFLAGS"; then
+-        pkg_cv_USB_CFLAGS="$USB_CFLAGS"
+-    else
+-        if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-legacy\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb-legacy") 2>&5
+-  ac_status=$?
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; }; then
+-  pkg_cv_USB_CFLAGS=`$PKG_CONFIG --cflags "libusb-legacy" 2>/dev/null`
+-else
+-  pkg_failed=yes
+-fi
+-    fi
+-else
+-	pkg_failed=untried
+-fi
++int
++main ()
++{
+ 
+-if test x$cross_compiling = xyes
+-then
+-    if test -n "$PKG_CONFIG"; then
+-    if test -n "$USB_LIBS"; then
+-        pkg_cv_USB_LIBS="$USB_LIBS"
+-    else
+-        if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-legacy\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb-legacy") 2>&5
+-  ac_status=$?
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; }; then
+-  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "libusb-legacy" 2>/dev/null`
+-else
+-  pkg_failed=yes
+-fi
+-    fi
+-else
+-	pkg_failed=untried
+-fi
+-    _pkg_tmp=
+-  for flag in $pkg_cv_USB_LIBS; do
+-    case $flag in
+-    (-L/lib* | -L/usr/lib* )	   ;; # ignore
+-    (*) _pkg_tmp="$_pkg_tmp $flag" ;;
+-    esac
+-  done
+-  pkg_cv_USB_LIBS="$_pkg_tmp"
+-else
+-  if test -n "$PKG_CONFIG"; then
+-    if test -n "$USB_LIBS"; then
+-        pkg_cv_USB_LIBS="$USB_LIBS"
+-    else
+-        if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-legacy\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb-legacy") 2>&5
+-  ac_status=$?
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; }; then
+-  pkg_cv_USB_LIBS=`$PKG_CONFIG --libs --static "libusb-legacy" 2>/dev/null`
+-else
+-  pkg_failed=yes
+-fi
+-    fi
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  libusbok=yes
+ else
+-	pkg_failed=untried
+-fi
++  libusbok=no
+ fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libusbok" >&5
++$as_echo "$libusbok" >&6; }
++      CPPFLAGS="$save_CPPFLAGS"
++      ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+-if test -n "$PKG_CONFIG"; then
+-    if test -n "$USB_INCLUDEDIR"; then
+-        pkg_cv_USB_INCLUDEDIR="$USB_INCLUDEDIR"
+-    else
+-        if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-legacy\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libusb-legacy") 2>&5
+-  ac_status=$?
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; }; then
+-  pkg_cv_USB_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "libusb-legacy" 2>/dev/null`
+-else
+-  pkg_failed=yes
+-fi
+-    fi
+-else
+-	pkg_failed=untried
+-fi
+ 
++      if test $libusbok = yes; then
++
++        ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
++        save_LIBS="$LIBS"
++        LIBS=""
++        case "$host_os" in
++          darwin*)
++            USB_LIBS="$USB_LIBS -lIOKit"
++            LIBS="$USB_LIBS"
++            ;;
++          *) ;;
++        esac
+ 
++ 	        usb_lib_name=`echo $USB_LIBS | sed -e "s at .*-l\(usb[^ ]*\).*@\1@"`
+ 
+-if test $pkg_failed = yes; then
++                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking $libusb_name for function $usb_lib_func in library $usb_lib_name" >&5
++$as_echo_n "checking $libusb_name for function $usb_lib_func in library $usb_lib_name... " >&6; }
++        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+-        _pkg_short_errors_supported=yes
+-else
+-        _pkg_short_errors_supported=no
+-fi
+-        if test $_pkg_short_errors_supported = yes; then
+-	        USB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libusb-legacy"`
+-        else
+-	        USB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libusb-legacy"`
+-        fi
+-	# Put the nasty error message in config.log where it belongs
+-	echo "$USB_PKG_ERRORS" >&5
++          #ifdef __cplusplus
++          extern "C"
++          #endif
++          char $usb_lib_func ();
+ 
+-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-                libusbok=no
+-elif test $pkg_failed = untried; then
+-	libusbok=no
++int
++main ()
++{
++return $usb_lib_func ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  libusbok=yes
+ else
+-	USB_CFLAGS=$pkg_cv_USB_CFLAGS
+-	USB_LIBS=$pkg_cv_USB_LIBS
+-	USB_INCLUDEDIR=$pkg_cv_USB_INCLUDEDIR
+-
+-	USB_CPPFLAGS=""
+-	for flag in $USB_CFLAGS; do
+-	  case $flag in
+-          -I* | -D* | -U*) USB_CPPFLAGS="$USB_CPPFLAGS $flag" ;;
+-          esac
+-        done
+-	pkg_cv_USB_CPPFLAGS=$USB_CPPFLAGS
++  libusbok=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libusbok" >&5
++$as_echo "$libusbok" >&6; }
++        case "$host_os" in
++          cygwin* | mingw*)
++            USB_LIBS="$LIBS"
++            ;;
++          *) ;;
++        esac
++        LIBS="$save_LIBS"
++        ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+ 
+-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+-$as_echo "yes" >&6; }
++        if test $libusbok = yes; then
++          if test ${libusb_name} != "libusb-1.0"; then
++                                    ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+-        libusbok=yes
+-        LIBUSB_PKG_CONFIG_NAME='libusb-legacy'
++            save_CPPFLAGS="$CPPFLAGS"
++            CPPFLAGS="$USB_INCLUDES"
++            save_LIBS="$LIBS"
++            LIBS="$USB_LIBS"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking $libusb_name for symbol usb_debug in library $usb_lib_name" >&5
++$as_echo_n "checking $libusb_name for symbol usb_debug in library $usb_lib_name... " >&6; }
++            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++              extern int usb_debug;
++int
++main ()
++{
++usb_debug = 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  libusbok=yes
++else
++  libusbok=no
+ fi
+-    fi
+-        usb_header='usb.h'
+-    usb_lib_func='usb_bulk_write'
+-    usb_lib_name='usb'
+-  fi
+-
+-  if test x$req_libusb1 != xyes || test $have_libusb1 = yes; then
+-            libusbok=yes
+-
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libusbok" >&5
++$as_echo "$libusbok" >&6; }
++            LIBS="$save_LIBS"
++            CPPFLAGS="$save_CPPFLAGS"
++            ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
++          fi
++        fi
++      fi
++    fi
++        if test $libusbok = yes; then
++      LIBUSB_PKG_CONFIG_NAME="${libusb_name}"
++      break
++    else
++                  unset USB_INCLUDEDIR
++      unset USB_INCLUDES
++      unset USB_LIBS
++      unset $as_ac_Header
++      unset $as_ac_Lib
++    fi
++  done
+ 
+-    ac_ext=c
++  if test $libusbok = yes; then
++        ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+     save_CPPFLAGS="$CPPFLAGS"
+-    if test x$USB_INCLUDEDIR != x; then
+-      USB_INCLUDES="-I$USB_INCLUDEDIR"
+-      CPPFLAGS="$CPPFLAGS $USB_INCLUDES"
+-
+-    fi
+-    for ac_header in $usb_header
++    CPPFLAGS="$USB_INCLUDES"
++        for ac_header in $usb_header
+ do :
+   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+-eval as_val=\$$as_ac_Header
+-   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+@@ -24626,27 +24633,20 @@
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: USRP requires libusb header '$usb_header' which was not found or was not usable. See http://www.libusb.org" >&5
+ $as_echo "USRP requires libusb header '$usb_header' which was not found or was not usable. See http://www.libusb.org" >&6; }
+     else
+-
+-
+-      ac_ext=c
++            ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
++      save_CPPFLAGS="$CPPFLAGS"
++      CPPFLAGS="$USB_INCLUDES"
+       save_LIBS="$LIBS"
+-      LIBS=""
+-      case "$host_os" in
+-        darwin*)
+-          USB_LIBS="$USB_LIBS -lIOKit"
+-          LIBS="$USB_LIBS"
+-          ;;
+-        *) ;;
+-      esac
++      LIBS="$USB_LIBS"
+       as_ac_Lib=`$as_echo "ac_cv_lib_$usb_lib_name''_$usb_lib_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $usb_lib_func in -l$usb_lib_name" >&5
+ $as_echo_n "checking for $usb_lib_func in -l$usb_lib_name... " >&6; }
+-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+@@ -24681,8 +24681,7 @@
+ eval ac_res=\$$as_ac_Lib
+ 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
+-eval as_val=\$$as_ac_Lib
+-   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_LIB$usb_lib_name" | $as_tr_cpp` 1
+ _ACEOF
+@@ -24694,16 +24693,10 @@
+         libusbok=no
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: USRP requires library '$usb_lib_name' with function '$usb_lib_func', which was either not found or was not usable. See http://www.libusb.org" >&5
+ $as_echo "USRP requires library '$usb_lib_name' with function '$usb_lib_func', which was either not found or was not usable. See http://www.libusb.org" >&6; }
+-
+ fi
+ 
+-      case "$host_os" in
+-        cygwin* | mingw*)
+-          USB_LIBS="$LIBS"
+-          ;;
+-        *) ;;
+-      esac
+       LIBS="$save_LIBS"
++      CPPFLAGS="$save_CPPFLAGS"
+       ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -24712,10 +24705,13 @@
+ 
+     fi
+   fi
+-  if test $libusbok = yes; then
+ 
++  if test $libusbok = yes; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: Using LIBUSB version '${libusb_name}'" >&5
++$as_echo "$as_me: Using LIBUSB version '${libusb_name}'" >&6;}
+     :
+   else
++        LIBUSB_PKG_CONFIG_NAME=
+     USB_INCLUDES=
+     USB_LIBS=
+     passed=no;{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Unable to find dependency libusb." >&5
+@@ -24724,6 +24720,12 @@
+ 
+ 
+ 
++
++
++    LDFLAGS=${saved_LDFLAGS}
++
++
++
+ 	sdccok=yes
+ 	# Extract the first word of "sdcc", so it can be a program name with args.
+ set dummy sdcc; ac_word=$2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100904/342b3783/attachment.html>


More information about the macports-changes mailing list