diff options
author | Pali Rohár <pali@kernel.org> | 2021-12-26 18:47:33 +0100 |
---|---|---|
committer | Martin Mareš <mj@ucw.cz> | 2021-12-26 22:51:59 +0100 |
commit | d9a7eb8f55ca5b886682cedd19f69292752ebd6b (patch) | |
tree | 680eca59015d9a127ca4d300ea72449284f55afa | |
parent | 8493c9f686e970ac0ecd0f69d6a8398f3bceac28 (diff) | |
download | pciutils-d9a7eb8f55ca5b886682cedd19f69292752ebd6b.tar.gz |
configure: Generate config files for PCI_OS_WINDOWS
This change adds support for using configure script for cross-compiling
pciutils on Linux for Windows platforms.
Following command can be used to compile pcitils for Windows platform:
make CROSS_COMPILE=i586-mingw32msvc- HOST=i386-windows ZLIB=no IDSDIR=.
PCI_OS_WINDOWS does not support BSD DNS functions, so do not automatically
enable DNS support.
Library ioperm is cygwin specific and is used only for PCI_OS_CYGWIN.
-rwxr-xr-x | lib/configure | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/configure b/lib/configure index ddcad87..9069248 100755 --- a/lib/configure +++ b/lib/configure @@ -142,10 +142,16 @@ case $sys in echo >>$c '#define PCI_HAVE_PM_INTEL_CONF' EXEEXT=.exe ;; - cygwin) + cygwin|windows) echo_n " i386-ports" echo >>$c '#define PCI_HAVE_PM_INTEL_CONF' - echo >>$m 'WITH_LIBS+=-lioperm' + if [ "$sys" = "cygwin" ] ; then + # ioperm is cygwin specific library and used only by lib/i386-io-cygwin.h + echo >>$m 'WITH_LIBS+=-lioperm' + elif [ "$sys" = "windows" ] ; then + # advapi32 is windows system library and used only by lib/i386-io-windows.h + echo >>$m 'WITH_LIBS+=-ladvapi32' + fi EXEEXT=.exe ;; beos|haiku) @@ -199,7 +205,7 @@ echo_n "Checking for DNS support... " if [ "$DNS" = yes -o "$DNS" = no ] ; then echo "$DNS (set manually)" else - if [ -f "$SYSINCLUDE/resolv.h" ] ; then + if [ "$sys" != "windows" -a -f "$SYSINCLUDE/resolv.h" ] ; then DNS=yes else DNS=no |