From 49df9f04e052e1aef5dde15f29cdcfdda2bc5753 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 21 Jan 2020 17:00:44 -0800 Subject: [PATCH] GUACAMOLE-935: Use C preprocessor to determine FreeRDP version rather than running a test program. AC_RUN_IFELSE cannot be used when cross-compiling, whereas AC_EGREP_CPP can. --- configure.ac | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index cac4307f..6f8fd9b7 100644 --- a/configure.ac +++ b/configure.ac @@ -589,23 +589,16 @@ then # manually free all data associated with the rdpBitmap, even data which # was not allocated by the implementation. AC_MSG_CHECKING([whether Bitmap_Free() frees the rdpBitmap and its image data]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ + AC_EGREP_CPP([\"2.0.0-dev\"], [ #include + FREERDP_VERSION_FULL - #include - - int main() { - /* Return successfully if version is 2.0.0-rc0 */ - return strcmp(FREERDP_VERSION_FULL, "2.0.0-dev"); - } - - ]])], + ], [AC_MSG_RESULT([yes])] [AC_DEFINE([FREERDP_BITMAP_FREE_FREES_BITMAP],, [Whether Bitmap_Free() frees the rdpBitmap and its image data])], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([assuming no (cross-compiling)])]) + [AC_MSG_RESULT([no])]) fi