From 20ca4ef6f6068fcb2c76e463b0263d88e0be17e0 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 16 Jul 2013 19:36:58 -0700 Subject: [PATCH] Add C macro for WinPR detection. --- configure.ac | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index ac714fd3..928f09b3 100644 --- a/configure.ac +++ b/configure.ac @@ -213,6 +213,7 @@ fi # FreeRDP # +have_winpr=yes have_freerdp=yes RDP_LIBS= @@ -244,11 +245,19 @@ AC_CHECK_LIB([freerdp-codec], [freerdp_image_convert], [have_freerdp=no]) # Check for stream support via WinPR -AC_CHECK_HEADER(winpr/stream.h,, # <-- stable-1.1 - AC_CHECK_LIB([freerdp-utils], [stream_write_uint8],, # <-- stable-1.0 - [have_freerdp=no])) +AC_CHECK_HEADER(winpr/stream.h,, # <-- stable-1.1 + [have_winpr=no, + AC_CHECK_LIB([freerdp-utils], [stream_write_uint8],, # <-- stable-1.0 + [have_freerdp=no])]) -AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp}" = "xyes"]) +if test "x${have_winpr}" = "xyes" +then + AC_DEFINE([ENABLE_WINPR]) +fi + + +AM_CONDITIONAL([ENABLE_WINPR], [test "x${have_winpr}" = "xyes"]) +AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp}" = "xyes"]) AC_SUBST(RDP_LIBS)