summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2006-11-03 18:57:50 +0000
committerMarcus Boerger <helly@php.net>2006-11-03 18:57:50 +0000
commit76b73a6ff29d71bbbb400b4a64afd1737745a111 (patch)
tree16ddb2525675c08f838088eabe75c85cbba520a9
parent49c109693a348008c251068b0110fa0d41f29043 (diff)
downloadphp-git-76b73a6ff29d71bbbb400b4a64afd1737745a111.tar.gz
- MFH: Include new headers only if present
-rw-r--r--ext/ming/config.m43
-rw-r--r--ext/ming/ming.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/ext/ming/config.m4 b/ext/ming/config.m4
index bc92e239a9..4cf3d9c5c2 100644
--- a/ext/ming/config.m4
+++ b/ext/ming/config.m4
@@ -84,6 +84,9 @@ int main(void) { SWFMovie_output(NULL, NULL, NULL, 0); return 0; }
], [])
CPPFLAGS=$old_CPPFLAGS
+ AC_CHECK_HEADERS([ming/displaylist.h])
+ AC_CHECK_HEADERS([ming/movie.h])
+
PHP_NEW_EXTENSION(ming, ming.c, $ext_shared)
PHP_SUBST(MING_SHARED_LIBADD)
fi
diff --git a/ext/ming/ming.c b/ext/ming/ming.c
index 7dab0d1c35..772a6b2a29 100644
--- a/ext/ming/ming.c
+++ b/ext/ming/ming.c
@@ -36,8 +36,12 @@
#include <stdio.h>
#include <math.h>
#include <ming.h>
-#include <ming/displaylist.h>
-#include <ming/movie.h>
+#ifdef HAVE_MING_DISPLAYLIST_H
+# include <ming/displaylist.h>
+#endif
+#ifdef HAVE_MING_MOVIE_H
+# include <ming/movie.h>
+#endif
#define FLOAT_Z_DVAL_PP(x) ((float)Z_DVAL_PP(x))
#define BYTE_Z_LVAL_PP(x) ((byte)Z_LVAL_PP(x))