SourceForge has been redesigned. Learn more.
Close

[e9e6e6]: / configure.ac  Maximize  Restore  History

Download this file

205 lines (172 with data), 5.9 kB

AC_INIT
AC_CONFIG_SRCDIR([src/main.c])

AM_CONFIG_HEADER(include/config.h)
AM_INIT_AUTOMAKE(gxine, 0.4.0-rc2)
AM_MAINTAINER_MODE
dnl AM_ACLOCAL_INCLUDE(m4)

CFLAGS="$CFLAGS -D_GNU_SOURCE"

dnl ---------------------------------------------
dnl Check for programs.
dnl ---------------------------------------------
dnl Save CFLAGS, AC_ISC_POSIX set some unwanted default CFLAGS
saved_CFLAGS="$CFLAGS"
AC_ISC_POSIX
CFLAGS="$saved_CFLAGS"
AC_PROG_CC
AC_HEADER_STDC
dnl AC_ARG_PROGRAM

dnl ---------------------------------------------
dnl Libtool
dnl ---------------------------------------------
AC_LIBTOOL_DLOPEN
dnl AM_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)

AM_PROG_LIBTOOL

dnl ---------------------------------------------
dnl gettext
dnl ---------------------------------------------
AM_GNU_GETTEXT([external])

ALL_LINGUAS="cs de"

dnl ---------------------------------------------
dnl Checks for X11
dnl ---------------------------------------------
AC_PATH_XTRA

dnl ---------------------------------------------
dnl Check for Xaw headers
dnl ---------------------------------------------
AC_CHECK_HEADER(X11/Xaw/Form.h,,
       [AC_MSG_ERROR([you need to install libxaw header files (-dev package)])])

dnl ---------------------------------------------
dnl check for gtk 2
dnl ---------------------------------------------
PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.0.0)
PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0)
PKG_CHECK_MODULES(GTHREAD2, gthread-2.0 >= 2.0.0)

dnl ---------------------------------------------
dnl XTest Extension
dnl ---------------------------------------------
AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, 
             XTEST_LIBS="-lXtst"
             AC_DEFINE(HAVE_XTESTEXTENSION,,[Define this if you have libXtst installed])
	     ac_have_xtest="yes",, $X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS)
AC_SUBST(XTEST_LIBS)
AM_CONDITIONAL(HAVE_XTESTEXTENSION, test x$ac_have_xtest = "xyes")

dnl ---------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
dnl ---------------------------------------------
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_CHECK_TYPES([ptrdiff_t])
AC_C_BIGENDIAN

dnl ---------------------------------------------
dnl debug cflags
dnl ---------------------------------------------
AC_SUBST(DEBUG_CFLAGS)
DEBUG_CFLAGS="$CFLAGS -g -O -DDEBUG -Wall -D_GNU_SOURCE"

dnl ---------------------------------------------
dnl threads
dnl ---------------------------------------------

case $host in
  *-*-freebsd*)
    THREAD_LIBS="-pthread"
    CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib -D_THREAD_SAFE"
    DEBUG_CFLAGS="$DEBUG_CFLAGS"
    CPPFLAGS="$CPPFLAGS -I/usr/local/include"
    LDFLAGS="$LDFLAGS -L/usr/local/lib"
    ;;
  *)
    AC_CHECK_LIB(pthread, pthread_create,
             THREAD_LIBS="-lpthread",
             AC_MSG_ERROR(pthread needed))
    ;;
esac
AC_SUBST(THREAD_LIBS)

dnl ---------------------------------------------
dnl Check for xine-lib
dnl ---------------------------------------------
AM_PATH_XINE(1.0.0,, AC_MSG_ERROR(*** Please install xine-lib first ***))

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

dnl ---------------------------------------------
dnl Check for lirc
dnl ---------------------------------------------
AC_CHECK_LIRC

dnl ---------------------------------------------
dnl Check for libsmjs (spidermonkey)
dnl ---------------------------------------------
AC_MSG_CHECKING(whether external SpiderMonkey library requested)
AC_ARG_WITH(external-spidermonkey,
	    AS_HELP_STRING(--with-external-spidermonkey,
			   [use external SpiderMonkey library (libsmjs)]),
	    if test "$withval" = no; then smjs=no; else smjs=yes; fi,
	    smjs=no)
AC_MSG_RESULT($smjs)
if test "$smjs" = yes; then
  AC_CHECK_HEADER([smjs/jsapi.h],
		  [LIBS="$LIBS -lsmjs"],
		  [AC_MSG_WARN([libsmjs not found - using internal copy])
		   smjs=no],
		  [#define XP_UNIX])
fi
AM_CONDITIONAL([INTERNAL_JS], [test "$smjs" = no])

dnl ---------------------------------------------
dnl it seems automake 1.5 doesn't take care about this script
dnl ---------------------------------------------
if test ! -z $am_depcomp; then
	DEPCOMP="depcomp"
fi
AC_SUBST(DEPCOMP)


dnl ---------------------------------------------
dnl where to install the browser plugin
dnl ---------------------------------------------

if test "x$prefix" = xNONE; then
   prefix="${ac_default_prefix}"
fi
if test "x$exec_prefix" = xNONE; then
   exec_prefix='${prefix}'
fi

GXINE_PLUGINDIR="$libdir/gxine"
eval GXINE_PLUGINPATH=`eval echo "$GXINE_PLUGINDIR"`
AC_DEFINE_UNQUOTED(GXINE_PLUGINDIR,"$GXINE_PLUGINPATH",[where to install the browser plugin])
AC_SUBST(GXINE_PLUGINPATH)

GXINE_BINDIR="$bindir"
eval GXINE_BINPATH=`eval echo "$GXINE_BINDIR"`
AC_DEFINE_UNQUOTED(GXINE_BINDIR,"$GXINE_BINPATH",[where to install the binary])
AC_SUBST(GXINE_BINPATH)

GXINE_LOGODIR="$datadir/gxine"
eval GXINE_LOGOPATH=`eval echo "$GXINE_LOGODIR"`
AC_DEFINE_UNQUOTED(GXINE_LOGODIR,"$GXINE_LOGOPATH",[where to install the logo])
AC_SUBST(GXINE_LOGOPATH)

GXINE_PIXMAPDIR="$datadir/gxine/pixmaps"
eval GXINE_PIXMAPPATH=`eval echo "$GXINE_PIXMAPDIR"`
AC_DEFINE_UNQUOTED(GXINE_PIXMAPDIR,"$GXINE_PIXMAPPATH",[where to install pixmaps])
AC_SUBST(GXINE_PIXMAPPATH)

GXINE_MISCDIR="$datadir/gxine"
eval GXINE_MISCPATH=`eval echo "$GXINE_MISCDIR"`
AC_DEFINE_UNQUOTED(GXINE_MISCDIR,"$GXINE_MISCPATH",[where to install misc files (e.g. sample mediamarks)])
AC_SUBST(GXINE_MISCPATH)


AC_CONFIG_FILES([
Makefile
src/Makefile
src/spidermonkey/Makefile
src/spidermonkey/fdlibm/Makefile
browser-plugin/Makefile
pixmaps/Makefile
doc/Makefile
doc/man/Makefile
doc/man/de/Makefile
doc/man/en/Makefile
include/Makefile
m4/Makefile
misc/Makefile
misc/build_rpms.sh
misc/gxine.spec
po/Makefile.in
])

dnl doc/C/Makefile
AC_CONFIG_COMMANDS([default],[[chmod +x ./misc/build_rpms.sh]],[[]])
AC_OUTPUT