OSDN Git Service

Bump version to 0.9.1 (sigh).
[android-x86/external-libpciaccess.git] / configure.ac
1
2 dnl (C) Copyright IBM Corporation 2006
3 dnl All Rights Reserved.
4 dnl
5 dnl Permission is hereby granted, free of charge, to any person obtaining a
6 dnl copy of this software and associated documentation files (the "Software"),
7 dnl to deal in the Software without restriction, including without limitation
8 dnl on the rights to use, copy, modify, merge, publish, distribute, sub
9 dnl license, and/or sell copies of the Software, and to permit persons to whom
10 dnl the Software is furnished to do so, subject to the following conditions:
11 dnl
12 dnl The above copyright notice and this permission notice (including the next
13 dnl paragraph) shall be included in all copies or substantial portions of the
14 dnl Software.
15 dnl
16 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 dnl FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
19 dnl IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 dnl DEALINGS IN THE SOFTWARE.
23 dnl
24 dnl Process this file with autoconf to create configure.
25
26 # AC_DEFINE_DIR macro from autoconf-archive.cryp.to
27 AC_DEFUN([AC_DEFINE_DIR], [
28   prefix_NONE=
29   exec_prefix_NONE=
30   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
31   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
32 dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
33 dnl refers to ${prefix}.  Thus we have to use `eval' twice.
34   eval ac_define_dir="\"[$]$2\""
35   eval ac_define_dir="\"$ac_define_dir\""
36   AC_SUBST($1, "$ac_define_dir")
37   AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
38   test "$prefix_NONE" && prefix=NONE
39   test "$exec_prefix_NONE" && exec_prefix=NONE
40 ])
41
42 AC_PREREQ([2.57])
43
44 AC_INIT(libpciaccess, 0.9.1, [none yet], libpciaccess)
45 AM_INIT_AUTOMAKE([dist-bzip2])
46 AM_MAINTAINER_MODE
47
48 AM_CONFIG_HEADER(config.h)
49
50 # Check for progs
51 AC_PROG_CC
52 AC_PROG_LIBTOOL
53
54 m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
55
56 DEFAULT_PCIIDS_PATH=/usr/share/hwdata
57 AC_ARG_WITH(pciids-path,
58         AS_HELP_STRING([--with-pciids-path=PCIIDS_PATH], [Path to pci.ids file]),
59         [PCIIDS_PATH="$withval"],
60         [PCIIDS_PATH="$DEFAULT_PCIIDS_PATH"])
61 AC_DEFINE_DIR(PCIIDS_PATH, PCIIDS_PATH, [Path to pci.ids])
62
63 if test "x$GCC" = "xyes"; then
64        GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes"
65        GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations"
66        GCC_WARNINGS3="-Wnested-externs"
67        GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3"
68        if test "x$WERROR" = "xyes"; then
69                GCC_WARNINGS="${GCC_WARNINGS} -Werror"
70        fi
71        PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS $GCC_WARNINGS"
72 fi
73
74 case $host_os in
75         *freebsd*)
76                 freebsd=yes
77                 ;;
78         *linux*)
79                 linux=yes
80                 ;;
81         *solaris*)
82                 solaris=yes
83                 ;;
84 esac
85
86 AM_CONDITIONAL(LINUX, [test "x$linux" = xyes])
87 AM_CONDITIONAL(FREEBSD, [test "x$freebsd" = xyes])
88 AM_CONDITIONAL(SOLARIS, [test "x$solaris" = xyes])
89
90 AC_SUBST(PCIACCESS_CFLAGS)
91 AC_SUBST(PCIACCESS_LIBS)
92                   
93 XORG_RELEASE_VERSION
94
95 AC_OUTPUT([Makefile
96            src/Makefile
97            pciaccess.pc])