ext/gd/config.m4
| From: | Joey Smith | Date: | Sun, 23 Jul 2000 05:28:28 +0000 |
| Subject: | ext/gd/config.m4 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-25537@lists.php.net to get a copy of this message | ||
There appear to be some problems in the gd detection. I'm not quite sure
what the best way is to solve them, but I'm hoping to start a dialog
that will lead to a conclusion.
On my machine, all of the gd checks fail. If configure is checking for
gdImageCreateFromPng, for example, I get "no", and checking config.log
shows me that this is bcz there were unresolved symbols in gd.so from
the other libraries that are need, like jpeg or Xpm.
The only way I have been able to get gd to actually detect what I have
is to apply the following patch:
Index: config.m4
===================================================================
RCS file: /repository/php4/ext/gd/config.m4,v
retrieving revision 1.35
diff -u -u -r1.35 config.m4
--- config.m4 2000/06/26 15:23:52 1.35
+++ config.m4 2000/07/23 05:17:46
@@ -63,6 +63,14 @@
GD_LIBS="-lgd"
else
AC_MSG_RESULT(yes (static))
+
+ AC_ADD_LIBRARY(z)
+ AC_ADD_LIBRARY(png)
+ AC_ADD_LIBRARY(jpeg)
+ AC_ADD_LIBRARY(ttf)
+ AC_ADD_LIBRARY_WITH_PATH(Xpm, /usr/X11R6/lib)
+ AC_ADD_LIBRARY_WITH_PATH(X11, /usr/X11R6/lib)
+
AC_ADD_LIBRARY(gd)
fi
old_LDFLAGS=$LDFLAGS
Long story short: I have to AC_LIBRARY_ADD everything: png, z, jpeg,
ttf, Xpm, and X11. Also, I hardcoded the locations of the last two,
simply bcz this was already a hack, and I can't concieve of the correct
way to do this.
If I do not add these lines, I cannot seem to get support for the gd
library. Well, phpinfo() tells me I have support for it (version 1.2,
when 1.8 is installed), but none of the imagecreatefrom*() are
available.
I'm not 100% percent sure that this is not bcz of a faulty gd install,
but there does appear to be a hole in the logic of ext/gd/config.m4...