File: configure.in

package info (click to toggle)
libg15 1.2.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,456 kB
  • ctags: 119
  • sloc: sh: 9,048; ansic: 681; makefile: 18
file content (53 lines) | stat: -rw-r--r-- 1,423 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(libg15, 1.2.6, mlampard@users.sourceforge.net)
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_TARGET()

AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR([libg15.c])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL

case $host_os in
	*linux*) 
	  AC_DEFINE([OSTYPE_LINUX], [1],[Target OS is Linux])
	  ;;
	*darwin*)
	  AC_DEFINE([OSTYPE_DARWIN], [1],[Target OS is Darwin])
	  ;;
        *solaris*)
          AC_DEFINE([OSTYPE_SOLARIS], [1],[Target OS is Solaris])
	  AC_SEARCH_LIBS([nanosleep],rt,[],[],[])
          AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of libusb.])
	  libusb_blocks=true	  
	  ;;
esac

# Checks for libraries.
AC_CHECK_LIB([usb], [main], ,AC_MSG_ERROR(["libusb not found. please install it"]))

dnl Some versions of libusb do not honour timeout and block. Suns' version is one of them.
if test "x$libusb_blocks" == "xtrue"; then
      AC_DEFINE([LIBUSB_BLOCKS], [1],[Define if libusb implementation blocks on read or write])
fi

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h])
AC_CHECK_HEADERS([usb.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.
AC_CHECK_FUNCS([memset])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT