summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2011-02-26 04:21:05 +0100
committerPeter Stuge <peter@stuge.se>2011-06-13 22:01:43 +0200
commit1a2d21fe42ad5a157651c787e2f500fc162c325b (patch)
tree7d08e813a4962079c39cee50a7d82ae0ef38cfd0 /configure.ac
parent717f47621d18de16b87e237f3740299f43e4ca1c (diff)
downloadlibusbx-1a2d21fe42ad5a157651c787e2f500fc162c325b.tar.gz
configure.ac: Refactor Windows backend settings into one occurence
The Windows backend is used both with MinGW and Cygwin, and since most settings are identical they can be set in one place.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 8 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 95623f2..ed84e42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,29 +63,25 @@ case $host in
[#include <poll.h>])
;;
*-mingw*)
- AC_DEFINE(OS_WINDOWS, 1, [Windows backend])
- AC_SUBST(OS_WINDOWS)
AC_MSG_RESULT([Windows])
backend="windows"
- PC_LIBS_PRIVATE="-lsetupapi -lole32 -ladvapi32"
- LTLDFLAGS="${LTLDFLAGS} -avoid-version -Wl,--add-stdcall-alias"
- AC_CHECK_TOOL(RC, windres, no)
- AC_DEFINE([POLL_NFDS_TYPE],[unsigned int],[type of second poll() argument])
;;
*-cygwin*)
- AC_DEFINE(OS_WINDOWS, 1, [Windows backend])
- AC_SUBST(OS_WINDOWS)
AC_MSG_RESULT([Cygwin (using Windows backend)])
backend="windows"
threads="posix"
- PC_LIBS_PRIVATE="-lsetupapi -lole32 -ladvapi32"
- LTLDFLAGS="${LTLDFLAGS} -avoid-version -Wl,--add-stdcall-alias"
- AC_CHECK_TOOL(RC, windres, no)
- AC_DEFINE([POLL_NFDS_TYPE],[unsigned int],[type of second poll() argument])
;;
*)
AC_MSG_ERROR([unsupported operating system])
esac
+if test "$backend" = windows; then
+ AC_DEFINE(OS_WINDOWS, 1, [Windows backend])
+ AC_SUBST(OS_WINDOWS)
+ PC_LIBS_PRIVATE="-lsetupapi -lole32 -ladvapi32"
+ LTLDFLAGS="${LTLDFLAGS} -avoid-version -Wl,--add-stdcall-alias"
+ AC_CHECK_TOOL(RC, windres, no)
+ AC_DEFINE([POLL_NFDS_TYPE],[unsigned int],[type of second poll() argument])
+fi
AC_SUBST(THREAD_CFLAGS)
AC_SUBST(PC_LIBS_PRIVATE)
LIBS="${LIBS} ${PC_LIBS_PRIVATE}"