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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Require autoconf version 2.59
dnl
AC_PREREQ(2.59)
m4_define([_PACKAGE], [xine-plugin])
m4_define([_VERSION], [1.0.2])
AC_INIT(_PACKAGE, _VERSION)
AC_CONFIG_SRCDIR([src/plugin.c])
PACKAGE=_PACKAGE
VERSION=_VERSION
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip])
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_INSTALL
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
dnl
dnl Checks for X11
dnl
PKG_CHECK_MODULES([X], [x11], , [AC_PATH_XTRA])
if test x"$no_x" != x"yes"; then
AC_DEFINE(HAVE_X11,,[Define this if you have X11R6 installed])
fi
dnl
dnl Check for xine-lib
dnl
AM_PATH_XINE(1.1.0,, AC_MSG_ERROR(*** You should install xine-lib first ***))
dnl
dnl threads: xine-config tell us what should be used, but
dnl xitk need to be linked to thread lib, so the follow AC_SUBST()
dnl are only used in src/xitk/xine-toolkit/Makefile.am
dnl
case "$host" in
*-*-freebsd*)
THREAD_LIBS="-L/usr/local/lib -pthread"
THREAD_CFLAGS="-I/usr/local/include -D_THREAD_SAFE"
CFLAGS="$CFLAGS -L/usr/local/lib $THREAD_CFLAGS"
CPPFLAGS="$CPPFLAGS -I/usr/local/include -L/usr/local/lib"
;;
*-*-hpux11*)
THREAD_LIBS=" -pthread"
THREAD_CFLAGS="-D_REENTRANT"
CFLAGS="$THREAD_CFLAGS $CFLAGS"
;;
*)
AC_CHECK_LIB(pthread, pthread_create,
THREAD_LIBS="-lpthread",
AC_MSG_ERROR(pthread needed))
;;
esac
AC_SUBST(THREAD_LIBS)
AC_SUBST(THREAD_CFLAGS)
CFLAGS="$CFLAGS -DXP_UNIX -Wall $XINE_CFLAGS"
AC_SUBST(CFLAGS)
DEBUG_CFLAGS="$CFLAGS -DLOG -O -g3 -finstrument-functions"
AC_SUBST(DEBUG_CFLAGS)
dnl AC_TRY_LDFLAGS([-Wl,-z,defs], [LDFLAGS="$LDFLAGS -Wl,-z,defs"])
dnl
dnl Whether to enable scriptability
dnl
AC_ARG_ENABLE(scripting,
AC_HELP_STRING(--disable-scripting,[disable scripting support (i.e. JavaScript)]),
scripting="$enableval", scripting="yes")
if test "x$scripting" != "xno"; then
AC_DEFINE(ENABLE_SCRIPTING,1,[Define to 1 to enable scripting support])
fi
dnl
dnl Whether to enable builtin playlist parser
dnl
AC_ARG_ENABLE(playlist-parser,
AC_HELP_STRING(--disable-playlist-parser,[disable builtin playlist parser]),
playlist="$enableval", playlist="yes")
if test "x$playlist" != "xno"; then
AC_DEFINE(ENABLE_PLAYLIST,1,[Define to 1 to enable builtin playlist parser])
fi
dnl
dnl Where plugin will be installed
dnl
AC_ARG_WITH(plugindir,
AS_HELP_STRING(--with-plugindir=<dir>,[specify plugin directory [[default=~/.mozilla/plugins]]]),
PLUGIN_DIR="$withval", PLUGIN_DIR="")
if test x"$PLUGIN_DIR" = x; then
PLUGIN_DIR="`echo $HOME`/.mozilla/plugins"
fi
AC_SUBST(PLUGIN_DIR)
dnl
dnl Logo format to use
dnl
AC_ARG_WITH(logo,
AS_HELP_STRING(--with-logo=<format>,[choose the logo format (ogg or png) [[default=ogg]]]),
logo_format="$withval", logo_format="ogg")
case "$logo_format" in
png)
PLUGIN_LOGO="xine-logo.png"
;;
*)
PLUGIN_LOGO="xine-logo.ogg"
;;
esac
AC_SUBST(PLUGIN_LOGO)
AC_DEFINE_UNQUOTED(LOGO_PATH,"$PLUGIN_DIR/$PLUGIN_LOGO",[Plugin logo path])
dnl
dnl It seems automake 1.5 don't take care about this script
dnl
if test ! -z "$am_depcomp"; then
DEPCOMP="depcomp"
fi
AC_SUBST(DEPCOMP)
AC_CONFIG_FILES([
Makefile
include/Makefile
include/obsolete/Makefile
m4/Makefile
src/Makefile
demo/Makefile
misc/Makefile
misc/xine-plugin.spec
misc/build_rpms.sh
])
AC_CONFIG_COMMANDS([default],[[chmod +x ./misc/build_rpms.sh]],[[]])
AC_OUTPUT
echo "----------------------------------------------------------------------"
echo "The plugin will be installed in: $PLUGIN_DIR"
echo "----------------------------------------------------------------------"
|