Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[e954c7]: configure.in Maximize Restore History

Download this file

configure.in    98 lines (80 with data), 2.2 kB

dnl Process this file with autoconf to produce a configure script.

AC_INIT
AC_CONFIG_SRCDIR([src/plugin.c])

dnl
dnl Require autoconf version 2.13
dnl
AC_PREREQ(2.53)

AM_INIT_AUTOMAKE("xineplugin", 0.1)

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
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.0.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"
    ;;
  *)
    AC_CHECK_LIB(pthread, pthread_create,
             THREAD_LIBS="-lpthread",
             AC_MSG_ERROR(pthread needed))
    ;;
esac
AC_SUBST(THREAD_LIBS)
AC_SUBST(THREAD_CFLAGS)

dnl
dnl dynamic linker
dnl
AC_CHECK_LIB(c, dlopen,
             DYNAMIC_LD_LIBS="",
             AC_CHECK_LIB(dl, dlopen,
                          DYNAMIC_LD_LIBS="-ldl",
                          AC_MSG_ERROR(dynamic linker needed)))
AC_SUBST(DYNAMIC_LD_LIBS)

CFLAGS="$CFLAGS -DXP_UNIX -Wall $XINE_CFLAGS"
AC_SUBST(CFLAGS)
DEBUG_CFLAGS="$CFLAGS $XINE_CFLAGS -g -O"
AC_SUBST(DEBUG_CFLAGS)


dnl where plugin will be installed
if test x"$PLUGIN_DIR" = x; then 
  PLUGIN_DIR="`echo $HOME`/.mozilla/plugins"
fi
AC_SUBST(PLUGIN_DIR)

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
m4/Makefile
src/Makefile
demo/Makefile
])
AC_OUTPUT

echo "----------------------------------------------------------------------"
echo "The plugin will be installed in: $PLUGIN_DIR"
echo "----------------------------------------------------------------------"