[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coldsync-hackers] understanding the configure script



I am moving along here on getting this working on my FreeBSD
machine. You are recommending (via FAQ) that I use USB support.
In fact, that is the default for FreeBSD. The problem is that
the configure script seems to not acknowledge the USB support.

I have checked the 3 files/variables that are checked by the script 
and confirmed that they are there.

I wonder, when it's looking for and evaluating whether certain files
are there, whether it has the base path wrong.

My problem is that I don't understand the programming well enough to 
know -where- and -how- it's looking for the files/variables.

If it's there, I don't see it, or I don't understand the logic.

Can someone help me along here?
Maybe it calling a routine in another file?

The area of the configure file I indentify follows;
_____________________________________________________

# Optional USB support
# (Only works under FreeBSD 4.x, for now)

# The --with(out)-usb option only indicates the user's desire. Even if
# it's turned on, 'configure' still checks to see whether it's
# possible to use the USB code. IOW, "--without-i18n" allows the user
# to turn off USB under *BSD, but that's it.
# Check whether --with-usb or --without-usb was given.
if test "${with_usb+set}" = set; then
  withval="$with_usb"
  WITH_USB="$withval"
else
  WITH_USB="yes"
fi
echo "flag for usb is set: $WITH_USB"

if test x"$WITH_USB" != xno; then
        echo $ac_n "checking for BSD USB support""... $ac_c" 1>&6
echo "configure:3897: checking for BSD USB support" >&5

        # This code snippet checks several things:
        #   1) <dev/usb/usb.h> exists
        #   2) It contains 'struct usb_device_info'
        #   3) That struct contains a 'vendorNo' field.
        # All three conditions must be true for USB support to be enabled
        cat > conftest.$ac_ext <<EOF
#line 3905 "configure"
#include "confdefs.h"
                #include <dev/usb/usb.h>
int main() {
                struct usb_device_info udi;
                 udi.vendorNo = 0x082d;
; return 0; }
EOF
if { (eval echo configure:3913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5;
}; then
  rm -rf conftest*
                cat >> confdefs.h <<EOF
#define WITH_USB 1
EOF

                echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
                echo "$ac_t""no" 1>&6
fi
rm -f conftest*
fi

# Don't build the Perl stuff
# Check whether --with-perl or --without-perl was given.
if test "${with_perl+set}" = set; then
  withval="$with_perl"
        WITH_PERL="$withval"
else
  WITH_PERL="yes"
fi

#'
if test x"$WITH_PERL" != xno; then
        # Name of Perl subdirectory
        PERLDIR=perl
else
        PERLDIR=""
fi


-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.