Added
Link Here
|
1 |
--- configure.ac.orig 2021-04-17 06:49:29 UTC |
2 |
+++ configure.ac |
3 |
@@ -41,6 +41,7 @@ AC_PROG_CC_C99 |
4 |
if test x"$ac_cv_prog_cc_c99" = xno; then |
5 |
AC_MSG_ERROR([C99 compiler is required.]) |
6 |
fi |
7 |
+AC_PROG_CPP |
8 |
AC_PROG_INSTALL |
9 |
AC_CANONICAL_HOST |
10 |
LT_INIT([disable-static]) |
11 |
@@ -204,7 +205,8 @@ AS_VAR_APPEND([SPICE_REQUIRES], [" pixman-1 >= $PIXMAN |
12 |
PKG_CHECK_MODULES(SSL, openssl >= 1.0.0) |
13 |
AC_SUBST(SSL_CFLAGS) |
14 |
AC_SUBST(SSL_LIBS) |
15 |
-AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"]) |
16 |
+dnl OpenSSL in the base system is not managed by pkgconfig |
17 |
+dnl AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"]) |
18 |
|
19 |
save_CFLAGS="$CFLAGS" |
20 |
CFLAGS="$CFLAGS $SSL_CFLAGS" |
21 |
@@ -217,15 +219,16 @@ CFLAGS="$save_CFLAGS" |
22 |
|
23 |
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, |
24 |
AC_MSG_CHECKING([for jpeglib.h]) |
25 |
- AC_TRY_CPP( |
26 |
-[#include <stdio.h> |
27 |
+ AC_PREPROC_IFELSE( |
28 |
+[AC_LANG_SOURCE([[ |
29 |
+#include <stdio.h> |
30 |
#undef PACKAGE |
31 |
#undef VERSION |
32 |
#undef HAVE_STDLIB_H |
33 |
-#include <jpeglib.h>], |
34 |
- JPEG_LIBS='-ljpeg' |
35 |
- AC_MSG_RESULT($jpeg_ok), |
36 |
- AC_MSG_ERROR([jpeglib.h not found])), |
37 |
+#include <jpeglib.h>]])], |
38 |
+ [JPEG_LIBS='-ljpeg' |
39 |
+ AC_MSG_RESULT($jpeg_ok)], |
40 |
+ [AC_MSG_ERROR([jpeglib.h not found])]), |
41 |
AC_MSG_ERROR([libjpeg not found])) |
42 |
AC_SUBST(JPEG_LIBS) |
43 |
|