summaryrefslogtreecommitdiff
path: root/ext/mime_magic/config.m4
blob: de7af20e6bcd161b8423fccff1c6d7bb89fb4efd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
dnl $Id$
dnl config.m4 for extension mime_magic

PHP_ARG_ENABLE(mime-magic, whether to enable mime_magic support,
[  --enable-mime-magic     Enable mime_magic support])

if test "$PHP_MIME_MAGIC" = "yes"; then
  dnl PHP_SUBST(MIME_MAGIC_SHARED_LIBADD)

  PHP_NEW_EXTENSION(mime_magic, mime_magic.c, $ext_shared)

  # Try to see if we can find the path of the magic file in its 
  # default locations.
  if test -f /usr/share/magic.mime ; then
	PHP_MIME_MAGIC_FILE_PATH=/usr/share/magic.mime
  elif test -f /usr/share/magic ; then
	PHP_MIME_MAGIC_FILE_PATH=/usr/share/magic	
  elif test -f /usr/share/misc/magic.mime ; then
 	PHP_MIME_MAGIC_FILE_PATH=/usr/share/misc/magic.mime
  elif test -f /etc/magic ; then
  	PHP_MIME_MAGIC_FILE_PATH=/etc/magic
  else
  	PHP_MIME_MAGIC_FILE_PATH=""	
  fi

  AC_DEFINE_UNQUOTED(PHP_MIME_MAGIC_FILE_PATH,"$PHP_MIME_MAGIC_FILE_PATH",[magic file path])

fi