summaryrefslogtreecommitdiff
path: root/lib/libpciaccess
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2007-06-16 16:22:11 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2007-06-16 16:22:11 +0000
commit4c20d0b72fab241c3c661dfe6ca062c709e9ce2e (patch)
tree97c41f93a66de032d0b37aa5986c7826919da8d9 /lib/libpciaccess
parent79834258535a465463706ad583bfd53218181492 (diff)
merge libpciaccess 2007/06/16
Diffstat (limited to 'lib/libpciaccess')
-rw-r--r--lib/libpciaccess/Makefile.in2
-rw-r--r--lib/libpciaccess/configure24
-rw-r--r--lib/libpciaccess/configure.ac4
-rw-r--r--lib/libpciaccess/src/Makefile.am8
-rw-r--r--lib/libpciaccess/src/Makefile.in13
-rw-r--r--lib/libpciaccess/src/common_init.c2
-rw-r--r--lib/libpciaccess/src/common_interface.c10
7 files changed, 57 insertions, 6 deletions
diff --git a/lib/libpciaccess/Makefile.in b/lib/libpciaccess/Makefile.in
index ed86041f2..8efa45e12 100644
--- a/lib/libpciaccess/Makefile.in
+++ b/lib/libpciaccess/Makefile.in
@@ -168,6 +168,8 @@ PCIIDS_PATH = @PCIIDS_PATH@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SOLARIS_FALSE = @SOLARIS_FALSE@
+SOLARIS_TRUE = @SOLARIS_TRUE@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
diff --git a/lib/libpciaccess/configure b/lib/libpciaccess/configure
index 36aed776c..f7d9ec6d3 100644
--- a/lib/libpciaccess/configure
+++ b/lib/libpciaccess/configure
@@ -464,7 +464,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PCIIDS_PATH LINUX_TRUE LINUX_FALSE FREEBSD_TRUE FREEBSD_FALSE OPENBSD_TRUE OPENBSD_FALSE PCIACCESS_CFLAGS PCIACCESS_LIBS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PCIIDS_PATH LINUX_TRUE LINUX_FALSE FREEBSD_TRUE FREEBSD_FALSE OPENBSD_TRUE OPENBSD_FALSE SOLARIS_TRUE SOLARIS_FALSE PCIACCESS_CFLAGS PCIACCESS_LIBS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -18610,6 +18610,9 @@ case $host_os in
*openbsd*)
openbsd=yes
;;
+ *solaris*)
+ solaris=yes
+ ;;
esac
@@ -18644,6 +18647,16 @@ fi
+if test "x$solaris" = xyes; then
+ SOLARIS_TRUE=
+ SOLARIS_FALSE='#'
+else
+ SOLARIS_TRUE='#'
+ SOLARIS_FALSE=
+fi
+
+
+
@@ -18827,6 +18840,13 @@ echo "$as_me: error: conditional \"OPENBSD\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${SOLARIS_TRUE}" && test -z "${SOLARIS_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"SOLARIS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"SOLARIS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -19436,6 +19456,8 @@ s,@FREEBSD_TRUE@,$FREEBSD_TRUE,;t t
s,@FREEBSD_FALSE@,$FREEBSD_FALSE,;t t
s,@OPENBSD_TRUE@,$OPENBSD_TRUE,;t t
s,@OPENBSD_FALSE@,$OPENBSD_FALSE,;t t
+s,@SOLARIS_TRUE@,$SOLARIS_TRUE,;t t
+s,@SOLARIS_FALSE@,$SOLARIS_FALSE,;t t
s,@PCIACCESS_CFLAGS@,$PCIACCESS_CFLAGS,;t t
s,@PCIACCESS_LIBS@,$PCIACCESS_LIBS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
diff --git a/lib/libpciaccess/configure.ac b/lib/libpciaccess/configure.ac
index c5e436c69..49cbb6977 100644
--- a/lib/libpciaccess/configure.ac
+++ b/lib/libpciaccess/configure.ac
@@ -81,11 +81,15 @@ case $host_os in
*openbsd*)
openbsd=yes
;;
+ *solaris*)
+ solaris=yes
+ ;;
esac
AM_CONDITIONAL(LINUX, [test "x$linux" = xyes])
AM_CONDITIONAL(FREEBSD, [test "x$freebsd" = xyes])
AM_CONDITIONAL(OPENBSD, [test "x$openbsd" = xyes])
+AM_CONDITIONAL(SOLARIS, [test "x$solaris" = xyes])
AC_SUBST(PCIACCESS_CFLAGS)
AC_SUBST(PCIACCESS_LIBS)
diff --git a/lib/libpciaccess/src/Makefile.am b/lib/libpciaccess/src/Makefile.am
index 3ab311f0a..2920ed275 100644
--- a/lib/libpciaccess/src/Makefile.am
+++ b/lib/libpciaccess/src/Makefile.am
@@ -37,6 +37,10 @@ if OPENBSD
OS_SUPPORT = openbsd_pci.c
endif
+if SOLARIS
+OS_SUPPORT = solx_devfs.c
+endif
+
libpciaccess_la_SOURCES = common_bridge.c \
common_iterator.c \
common_init.c \
@@ -59,4 +63,8 @@ libpciaccessinclude_HEADERS = \
noinst_PROGRAMS = scanpci
scanpci_SOURCES = scanpci.c
+if SOLARIS
+scanpci_LDADD = libpciaccess.la -ldevinfo
+else
scanpci_LDADD = libpciaccess.la
+endif
diff --git a/lib/libpciaccess/src/Makefile.in b/lib/libpciaccess/src/Makefile.in
index 7eb633464..ef5720c34 100644
--- a/lib/libpciaccess/src/Makefile.in
+++ b/lib/libpciaccess/src/Makefile.in
@@ -86,7 +86,8 @@ libpciaccess_la_DEPENDENCIES =
am__libpciaccess_la_SOURCES_DIST = common_bridge.c common_iterator.c \
common_init.c common_interface.c common_capability.c \
common_device_name.c pciaccess_private.h freebsd_pci.c \
- linux_sysfs.c openbsd_pci.c
+ linux_sysfs.c openbsd_pci.c solx_devfs.c
+@FREEBSD_FALSE@@LINUX_FALSE@@OPENBSD_FALSE@@SOLARIS_TRUE@am__objects_1 = solx_devfs.lo
@FREEBSD_FALSE@@LINUX_FALSE@@OPENBSD_TRUE@am__objects_1 = \
@FREEBSD_FALSE@@LINUX_FALSE@@OPENBSD_TRUE@ openbsd_pci.lo
@FREEBSD_FALSE@@LINUX_TRUE@am__objects_1 = linux_sysfs.lo
@@ -98,7 +99,8 @@ libpciaccess_la_OBJECTS = $(am_libpciaccess_la_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
am_scanpci_OBJECTS = scanpci.$(OBJEXT)
scanpci_OBJECTS = $(am_scanpci_OBJECTS)
-scanpci_DEPENDENCIES = libpciaccess.la
+@SOLARIS_FALSE@scanpci_DEPENDENCIES = libpciaccess.la
+@SOLARIS_TRUE@scanpci_DEPENDENCIES = libpciaccess.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -180,6 +182,8 @@ PCIIDS_PATH = @PCIIDS_PATH@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SOLARIS_FALSE = @SOLARIS_FALSE@
+SOLARIS_TRUE = @SOLARIS_TRUE@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
@@ -230,6 +234,7 @@ lib_LTLIBRARIES = libpciaccess.la
@FREEBSD_TRUE@OS_SUPPORT = freebsd_pci.c
@LINUX_TRUE@OS_SUPPORT = linux_sysfs.c
@OPENBSD_TRUE@OS_SUPPORT = openbsd_pci.c
+@SOLARIS_TRUE@OS_SUPPORT = solx_devfs.c
libpciaccess_la_SOURCES = common_bridge.c \
common_iterator.c \
common_init.c \
@@ -247,7 +252,8 @@ libpciaccessinclude_HEADERS = \
$(top_srcdir)/include/pciaccess.h
scanpci_SOURCES = scanpci.c
-scanpci_LDADD = libpciaccess.la
+@SOLARIS_FALSE@scanpci_LDADD = libpciaccess.la
+@SOLARIS_TRUE@scanpci_LDADD = libpciaccess.la -ldevinfo
all: all-am
.SUFFIXES:
@@ -337,6 +343,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux_sysfs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openbsd_pci.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanpci.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solx_devfs.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
diff --git a/lib/libpciaccess/src/common_init.c b/lib/libpciaccess/src/common_init.c
index 2fc981c52..c16f98ada 100644
--- a/lib/libpciaccess/src/common_init.c
+++ b/lib/libpciaccess/src/common_init.c
@@ -58,6 +58,8 @@ pci_system_init( void )
err = pci_system_freebsd_create();
#elif defined(__OpenBSD__)
err = pci_system_openbsd_create();
+#elif defined(__sun)
+ err = pci_system_solx_devfs_create();
#endif
return err;
diff --git a/lib/libpciaccess/src/common_interface.c b/lib/libpciaccess/src/common_interface.c
index 89feb5702..908e91589 100644
--- a/lib/libpciaccess/src/common_interface.c
+++ b/lib/libpciaccess/src/common_interface.c
@@ -48,7 +48,13 @@
# define HTOLE_16(x) (x)
# define LETOH_32(x) (x)
# define HTOLE_32(x) (x)
-#endif
+#endif /* linux */
+
+#elif defined(__sun)
+#define LETOH_16(x) (x)
+#define HTOLE_16(x) (x)
+#define LETOH_32(x) (x)
+#define HTOLE_32(x) (x)
#elif defined(__OpenBSD__)
@@ -68,7 +74,7 @@
#define LETOH_32(x) le32toh(x)
#define HTOLE_32(x) htole32(x)
-#endif
+#endif /* others */
/**
* Read a device's expansion ROM.