Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]

Modules

ADT
Database
GTK2
GUI
IP
PiJAX
Public
Sql
Stdio
Subversion
System
Tools
Xosd
lua
v4l2
wx

Recent Changes

Public.USB 1.0
Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4

Popular Downloads

Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48


Module Information
Public.USB
Viewing contents of Public_USB-1.0/configure.in

# $Id: configure.in,v 1.2 2005-09-22 20:23:20 hww3 Exp $
AC_INIT(usb_config.h.in)

AC_MODULE_INIT()
AC_CONFIG_HEADERS(usb_config.h)

# Check for libusb-1.0 using pkg-config
AC_MSG_CHECKING([for libusb-1.0])
if pkg-config --exists libusb-1.0; then
  AC_MSG_RESULT([yes])
  LIBUSB_CFLAGS=`pkg-config --cflags libusb-1.0`
  LIBUSB_LIBS=`pkg-config --libs libusb-1.0`
  AC_DEFINE([HAVE_LIBUSB_1_0], [1], [Define to 1 if you have libusb-1.0])
  have_libusb=yes
else
  AC_MSG_RESULT([no])
  AC_MSG_WARN([libusb-1.0 not found via pkg-config. USB functionality will not be available.])
  LIBUSB_CFLAGS=""
  LIBUSB_LIBS=""
  have_libusb=no
fi

# Get GMP flags if available (required by Pike headers)
if pkg-config --exists gmp; then
  GMP_CFLAGS=`pkg-config --cflags gmp`
else
  GMP_CFLAGS=""
fi

# Set compiler and linker flags for the module
CMOD_CFLAGS="${GMP_CFLAGS} ${LIBUSB_CFLAGS}"
CMOD_LIBS="${LIBUSB_LIBS}"

# Also add to CPPFLAGS so Pike's build system picks it up
CPPFLAGS="${CPPFLAGS} ${CMOD_CFLAGS}"
LDFLAGS="${LDFLAGS} ${CMOD_LIBS}"

# Check for the libusb header if pkg-config succeeded
if test "$have_libusb" = "yes"; then
  AC_CHECK_HEADERS([libusb.h])
fi 

AC_SUBST(CMOD_CFLAGS) 
AC_SUBST(CMOD_LIBS)

AC_OUTPUT(Makefile)



gotpike.org | Copyright © 2004 - 2019 | Pike is a trademark of Department of Computer and Information Science, Linköping University