~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/staging/usbip/userspace/configure.ac

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Process this file with autoconf to produce a configure script.
 
2
 
 
3
AC_PREREQ(2.59)
 
4
AC_INIT([usbip], [0.1.8], [usbip-devel@lists.sourceforge.net])
 
5
AC_DEFINE([USBIP_VERSION], [0x000106], [numeric version number])
 
6
 
 
7
CURRENT=0
 
8
REVISION=1
 
9
AGE=0
 
10
AC_SUBST([LIBUSBIP_VERSION], [$CURRENT:$REVISION:$AGE], [library version])
 
11
 
 
12
AC_CONFIG_SRCDIR([src/usbipd.c])
 
13
AC_CONFIG_HEADERS([config.h])
 
14
 
 
15
AM_INIT_AUTOMAKE([foreign])
 
16
LT_INIT
 
17
 
 
18
# Silent build for automake >= 1.11
 
19
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
20
 
 
21
AC_SUBST([EXTRA_CFLAGS], ["-Wall -Werror -Wextra -std=gnu99"])
 
22
 
 
23
# Checks for programs.
 
24
AC_PROG_CC
 
25
AC_PROG_INSTALL
 
26
AC_PROG_MAKE_SET
 
27
 
 
28
# Checks for header files.
 
29
AC_HEADER_DIRENT
 
30
AC_HEADER_STDC
 
31
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdint.h stdlib.h dnl
 
32
                  string.h strings.h sys/socket.h syslog.h unistd.h])
 
33
 
 
34
# Checks for typedefs, structures, and compiler characteristics.
 
35
AC_TYPE_INT32_T
 
36
AC_TYPE_SIZE_T
 
37
AC_TYPE_SSIZE_T
 
38
AC_TYPE_UINT16_T
 
39
AC_TYPE_UINT32_T
 
40
AC_TYPE_UINT8_T
 
41
 
 
42
# Checks for library functions.
 
43
AC_FUNC_REALLOC
 
44
AC_CHECK_FUNCS([bzero memset mkdir regcomp socket strchr strerror strstr dnl
 
45
                strtoul])
 
46
 
 
47
AC_CHECK_HEADER([sysfs/libsysfs.h],
 
48
                [AC_CHECK_LIB([sysfs], [sysfs_open_directory_list],
 
49
                              [LIBS="$LIBS -lsysfs"],
 
50
                              [AC_MSG_ERROR([Missing sysfs2 library!])])],
 
51
                [AC_MSG_ERROR([Missing /usr/include/sysfs/libsysfs.h])])
 
52
 
 
53
# Checks for libwrap library.
 
54
AC_MSG_CHECKING([whether to use the libwrap (TCP wrappers) library])
 
55
AC_ARG_WITH([tcp-wrappers],
 
56
            [AS_HELP_STRING([--with-tcp-wrappers],
 
57
                            [use the libwrap (TCP wrappers) library])],
 
58
            dnl [ACTION-IF-GIVEN]
 
59
            [saved_LIBS="$LIBS"
 
60
             if test "$withval" = "yes"; then
 
61
                     AC_MSG_RESULT([yes])
 
62
                     AC_MSG_CHECKING([for hosts_access in -lwrap])
 
63
                     LIBS="-lwrap $LIBS"
 
64
                     AC_TRY_LINK(
 
65
                       [int hosts_access(); int allow_severity, deny_severity;],
 
66
                       [hosts_access()],
 
67
                       [AC_MSG_RESULT([yes]);
 
68
                        AC_DEFINE([HAVE_LIBWRAP], [1],
 
69
                                  [use tcp wrapper]) wrap_LIB="-lwrap"],
 
70
                       [AC_MSG_RESULT([not found]); exit 1])
 
71
             else
 
72
                     AC_MSG_RESULT([no])
 
73
             fi
 
74
             LIBS="$saved_LIBS"],
 
75
            dnl [ACTION-IF-NOT-GIVEN]
 
76
            [AC_MSG_RESULT([(default)])
 
77
             AC_MSG_CHECKING([for hosts_access in -lwrap])
 
78
             saved_LIBS="$LIBS"
 
79
             LIBS="-lwrap $saved_LIBS"
 
80
             AC_TRY_LINK(
 
81
               [int hosts_access(); int allow_severity, deny_severity;],
 
82
               [hosts_access()],
 
83
               [AC_MSG_RESULT([yes]);
 
84
                AC_DEFINE([HAVE_LIBWRAP], [1], [use tcp wrapper])],
 
85
               [AC_MSG_RESULT([no]); LIBS="$saved_LIBS"])])
 
86
 
 
87
# Sets directory containing usb.ids.
 
88
USBIDS_DIR='${datadir}/usbip'
 
89
AC_ARG_WITH([usbids-dir],
 
90
            [AS_HELP_STRING([--with-usbids-dir=DIR],
 
91
               [where usb.ids is found (default ${datadir}/usbip)])],
 
92
            [USBIDS_DIR=$withval])
 
93
AC_SUBST([USBIDS_DIR])
 
94
 
 
95
dnl FIXME: when disabled, empty directry is created
 
96
usbids=install
 
97
AC_ARG_ENABLE([usbids-install],
 
98
              [AS_HELP_STRING([--enable-usbids-install],
 
99
                              [install usb.ids (default)])],
 
100
              [AS_CASE([$enableval],
 
101
                       [yes], [usbids=install],
 
102
                       [no], [usbids=notinstall],
 
103
                       [AC_MSG_ERROR(
 
104
                          [bad value ${enableval} for --enable-usbids-install])]
 
105
                      )])
 
106
AM_CONDITIONAL([INSTALL_USBIDS], [test x$usbids = xinstall])
 
107
 
 
108
GLIB2_REQUIRED=2.6.0
 
109
PKG_CHECK_MODULES([PACKAGE], [glib-2.0 >= $GLIB2_REQUIRED])
 
110
AC_SUBST([PACKAGE_CFLAGS])
 
111
AC_SUBST([PACKAGE_LIBS])
 
112
 
 
113
AC_CONFIG_FILES([Makefile libsrc/Makefile src/Makefile])
 
114
AC_OUTPUT