2003-01-28 01:00:15 +00:00
|
|
|
dnl
|
2002-03-24 23:00:47 +00:00
|
|
|
dnl $Id$
|
2003-01-28 01:00:15 +00:00
|
|
|
dnl
|
2002-03-24 23:00:47 +00:00
|
|
|
|
2003-01-28 01:00:15 +00:00
|
|
|
PHP_ARG_WITH(mime-magic, whether to include mime_magic support,
|
2003-10-03 05:24:33 +00:00
|
|
|
[ --with-mime-magic[=FILE]
|
2007-07-03 17:25:43 +00:00
|
|
|
Include mime_magic support (DEPRECATED!!)])
|
2002-03-24 23:00:47 +00:00
|
|
|
|
2003-01-28 01:00:15 +00:00
|
|
|
if test "$PHP_MIME_MAGIC" != "no"; then
|
2002-03-24 23:00:47 +00:00
|
|
|
|
|
|
|
PHP_NEW_EXTENSION(mime_magic, mime_magic.c, $ext_shared)
|
2002-08-22 12:21:25 +00:00
|
|
|
|
2003-01-28 01:00:15 +00:00
|
|
|
PHP_MIME_MAGIC_FILE_PATH=
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Try to see if we can find the path of the magic file in its default locations.
|
|
|
|
dnl
|
2003-01-28 06:52:09 +00:00
|
|
|
if test "$PHP_MIME_MAGIC" != "yes"; then
|
2003-01-28 01:00:15 +00:00
|
|
|
if test -f $PHP_MIME_MAGIC; then
|
|
|
|
PHP_MIME_MAGIC_FILE_PATH=$PHP_MIME_MAGIC
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([File '$PHP_MIME_MAGIC' not found!])
|
|
|
|
fi
|
2002-08-22 12:21:25 +00:00
|
|
|
else
|
2003-03-31 19:48:53 +00:00
|
|
|
MAGIC_MIME_LOCATIONS="/usr/local/apache/conf/magic /usr/local/etc/apache/conf/magic /etc/apache/magic /etc/httpd/conf/magic /usr/share/magic.mime /usr/share/misc/magic.mime /etc/magic.mime"
|
2002-08-22 12:21:25 +00:00
|
|
|
|
2003-01-28 01:00:15 +00:00
|
|
|
for i in $MAGIC_MIME_LOCATIONS; do
|
|
|
|
if test -f $i; then
|
|
|
|
PHP_MIME_MAGIC_FILE_PATH=$i
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2002-08-22 12:21:25 +00:00
|
|
|
AC_DEFINE_UNQUOTED(PHP_MIME_MAGIC_FILE_PATH,"$PHP_MIME_MAGIC_FILE_PATH",[magic file path])
|
|
|
|
|
2002-03-24 23:00:47 +00:00
|
|
|
fi
|