591 lines (551 with data), 13.9 kB
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([libnghost], [0.0.0], [kshots@warfaresdl.com])
AC_CONFIG_SRCDIR([src/core/processmanager.cpp])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([nghost2], [1.9])
AM_SANITY_CHECK
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG([0.9.0])
AC_ARG_WITH(
[pluginpath],
[AS_HELP_STRING(
[--with-pluginpath],
[Sets the plugin path @<:@default=${libdir}/nghost@:>@])],
[AC_SUBST([pkglibdir], [$withval])],
[AC_SUBST([pkglibdir], [${libdir}/nghost])])
AC_ARG_ENABLE(
[allwarnings],
[AS_HELP_STRING(
[--enable-allwarnings],
[Enables the -Wall and -Werror CFLAGS @<:@default=no@:>@])],
[
AC_SUBST([error], [-Wall -Werror])
],
[AC_SUBST([error], [""])])
AC_ARG_ENABLE(
[core],
[AS_HELP_STRING(
[--enable-core],
[Enables the core library @<:@default=yes@:>@])],
[
case $enableval in
yes|ye|y) enablecore=yes
;;
no|n) enablecore=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablecore=yes])
AC_ARG_ENABLE(
[dao],
[AS_HELP_STRING(
[--enable-dao],
[Enables the dao library @<:@default=yes@:>@])],
[
case $enableval in
yes|ye|y) enabledao=yes
;;
no|n) enabledao=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enabledao=yes])
AC_ARG_ENABLE(
[gui2],
[AS_HELP_STRING(
[--enable-gui2],
[Enables the nghost2 gui library @<:@default=yes@:>@])],
[
case $enableval in
yes|ye|y) enablegui2=yes
;;
no|n) enablegui2=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablegui2=yes])
AC_ARG_ENABLE(
[gui3],
[AS_HELP_STRING(
[--enable-gui3],
[Enables the nghost3 gui library @<:@default=no@:>@])],
[
case $enableval in
yes|ye|y) enablegui3=yes
;;
no|n) enablegui3=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablegui3=no])
AC_ARG_ENABLE(
[log],
[AS_HELP_STRING(
[--enable-log],
[Enables the log library @<:@default=yes@:>@])],
[
case $enableval in
yes|ye|y) enablelog=yes
;;
no|n) enablelog=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablelog=yes])
AC_ARG_ENABLE(
[net],
[AS_HELP_STRING(
[--enable-net],
[Enables the net library @<:@default=yes@:>@])],
[
case $enableval in
yes|ye|y) enablenet=yes
;;
no|n) enablenet=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablenet=yes])
AC_ARG_ENABLE(
[plugins],
[AS_HELP_STRING(
[--enable-plugins],
[Enables the nghost plugins @<:@default=yes@:>@])],
[
case $enableval in
yes|ye|y) enableplugins=yes
;;
no|n) enableplugins=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enableplugins=yes])
AC_ARG_ENABLE(
[mysql],
[AS_HELP_STRING(
[--enable-mysql],
[Enables the mysql database plugin @<:@default=no@:>@])],
[
case $enableval in
yes|ye|y)
if test "x$enableplugins" = "xno" ; then
AC_MSG_ERROR([plugin enabled when plugins disabled])
fi
enablemysql=yes
;;
no|n) enablemysql=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablemysql=no])
AC_ARG_ENABLE(
[sqlite],
[AS_HELP_STRING(
[--enable-sqlite],
[Enables the sqlite3 database plugin @<:@default=enableplugins@:>@])],
[
case $enableval in
yes|ye|y)
if test "x$enableplugins" = "xno" ; then
AC_MSG_ERROR([plugin enabled when plugins disabled])
fi
enablesqlite=yes
;;
no|n) enablesqlite=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablesqlite=$enableplugins])
AC_ARG_ENABLE(
[curl],
[AS_HELP_STRING(
[--enable-curl],
[Enables the curl download plugin @<:@default=enableplugins@:>@])],
[
case $enableval in
yes|ye|y)
if test "x$enableplugins" = "xno" ; then
AC_MSG_ERROR([plugin enabled when plugins disabled])
fi
enablecurl=yes
;;
no|n) enablecurl=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablecurl=$enableplugins])
AC_ARG_ENABLE(
[artgrabber-n2o2k],
[AS_HELP_STRING(
[--enable-artgrabber-n2o2k],
[Enables the n2o_2k artgrabber plugin @<:@default=enableplugins@:>@])],
[
case $enableval in
yes|ye|y)
if test "x$enableplugins" = "xno" ; then
AC_MSG_ERROR([plugin enabled when plugins disabled])
fi
enableartgrabbern2o2k=yes
;;
no|n) enableartgrabbern2o2k=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enableartgrabbern2o2k=$enableplugins])
AC_ARG_ENABLE(
[ipc],
[AS_HELP_STRING(
[--enable-ipc],
[Enables the video IPC (Inter-Process-Communication) plugin @<:@default=$enableplugins@:>@])],
[
case $enableval in
yes|ye|y)
if test "x$enableplugins" = "xno" ; then
AC_MSG_ERROR([plugin enabled when plugins disabled])
fi
enableipc=yes
;;
no|n) enableipc=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enableipc=$enableplugins])
AC_ARG_ENABLE(
[phonon],
[AS_HELP_STRING(
[--enable-phonon],
[Enables the phonon video plugin (Requires Qt >= 4.4.0) @<:@default=no@:>@])],
[
case $enableval in
yes|ye|y)
if test "x$enableplugins" = "xno" ; then
AC_MSG_ERROR([plugin enabled when plugins disabled])
fi
enablephonon=yes
;;
no|n) enablephonon=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablephonon=no])
AC_ARG_ENABLE(
[xine],
[AS_HELP_STRING(
[--enable-xine],
[Enables the xine video plugin @<:@default=no@:>@])],
[
case $enableval in
yes|ye|y)
if test "x$enableplugins" = "xno" ; then
AC_MSG_ERROR([plugin enabled when plugins disabled])
fi
enablexine=yes
;;
no|n) enablexine=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablexine=no])
AC_ARG_ENABLE(
[gstreamer],
[AS_HELP_STRING(
[--enable-gstreamer],
[Enables the gstreamer audio plugin @<:@default=$enableplugins@:>@])],
[
case $enableval in
yes|ye|y)
if test "x$enableplugins" = "xno" ; then
AC_MSG_ERROR([plugin enabled when plugins disabled])
fi
enablegstreamer=yes
;;
no|n) enablegstreamer=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablegstreamer=$enableplugins])
AC_ARG_ENABLE(
[sample],
[AS_HELP_STRING(
[--enable-sample],
[Enables the sample plugin for developers @<:@default=no@:>@])],
[
case $enableval in
yes|ye|y)
if test "x$enableplugins" = "xno" ; then
AC_MSG_ERROR([plugin enabled when plugins disabled])
fi
enablesample=yes
;;
no|n) enablesample=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablesample=no])
AC_ARG_ENABLE(
[hdradio],
[AS_HELP_STRING(
[--enable-hdradio],
[Enables the HD radio client plugin @<:@default=no@:>@])],
[
case $enableval in
yes|ye|y) enablehdradio=yes
;;
no|n) enablehdradio=no
;;
*) AC_MSG_ERROR([Invalid option "$enableval" - must be yes or no])
;;
esac
],
[enablehdradio=no])
needxmlpp=no
needx11=no
needsdl=no
needsdlttf=no
needsdlgfx=no
needsdlimage=no
needlibtool=no
needtaglib=no
needglibmm=no
needgl=no
needglu=no
needmysql=no
needsqlite3=no
needcurl=no
needqt44=no
needphonon=no
needxine=no
needgstreamer=no
AM_CONDITIONAL([CORE], [test "x$enablecore" = "xyes"])
AM_CONDITIONAL([DAO], [test "x$enabledao" = "xyes"])
AM_CONDITIONAL([GUI2], [test "x$enablegui2" = "xyes"])
AM_CONDITIONAL([GUI3], [test "x$enablegui3" = "xyes"])
AM_CONDITIONAL([LOG], [test "x$enablelog" = "xyes"])
AM_CONDITIONAL([NET], [test "x$enablenet" = "xyes"])
AM_CONDITIONAL([PLUGINS], [test "x$enableplugins" = "xyes"])
AM_CONDITIONAL([MYSQL], [test "x$enablemysql" = "xyes"])
AM_CONDITIONAL([SQLITE], [test "x$enablesqlite" = "xyes"])
AM_CONDITIONAL([CURL], [test "x$enablecurl" = "xyes"])
AM_CONDITIONAL([ARTGRABBERN2O2K], [test "x$enableartgrabbern2o2k" = "xyes"])
AM_CONDITIONAL([VIDEOIPC], [test "x$enableipc" = "xyes"])
AM_CONDITIONAL([PHONON], [test "x$enablephonon" = "xyes"])
AM_CONDITIONAL([VIDEOXINE], [test "x$enablephonon" = "xyes"])
AM_CONDITIONAL([AUDIOGSTREAMER], [test "x$enablegstreamer" = "xyes"])
AM_CONDITIONAL([SAMPLE], [test "x$enablesample" = "xyes"])
AM_CONDITIONAL([HDRADIO], [test "x$enablehdradio" = "xyes"])
if test "x$enablecore" = "xyes" ; then
needx11=yes
needsdl=yes
needlibtool=yes
fi
if test "x$enabledao" = "xyes" ; then
needtaglib=yes
fi
if test "x$enablegui2" = "xyes" ; then
needsdl=yes
needglibmm=yes
needxmlpp=yes
needsdlgfx=yes
needx11=yes
needgl=yes
needglu=yes
needsdlttf=yes
needsdlimage=yes
fi
if test "x$enablenet" = "xyes" ; then
needsdl=yes
fi
if test "x$enableplugins" = "xyes" ; then
needlibtool=yes
fi
if test "x$enablemysql" = "xyes" ; then
needmysql=yes
fi
if test "x$enablesqlite" = "xyes" ; then
needsqlite3=yes
fi
if test "x$enablecurl" = "xyes" ; then
needcurl=yes
fi
if test "x$enableartgrabbern2o2k" = "xyes" ; then
needxmlpp=yes
fi
if test "x$enablephonon" = "xyes" ; then
needqt44=yes
needphonon=yes
fi
if test "x$enablexine" = "xyes" ; then
needxine=yes
fi
if test "x$enablegstreamer" = "xyes" ; then
needgstreamer=yes
fi
# Checks for libraries.
if test "x$needxmlpp" = "xyes" ; then
PKG_CHECK_MODULES([xmlpp], [libxml++-2.6])
fi
if test "x$needx11" = "xyes" ; then
PKG_CHECK_MODULES([x11], [x11])
fi
if test "x$needsdl" = "xyes" ; then
PKG_CHECK_MODULES([sdl], [sdl])
fi
if test "x$needsdlttf" = "xyes" ; then
AC_CHECK_LIB([SDL_ttf], [TTF_Init])
fi
if test "x$needsdlgfx" = "xyes" ; then
AC_CHECK_HEADERS([SDL/SDL_rotozoom.h],
,
[AC_MSG_ERROR([Failed to find sdl-gfx headers. Please install and try again])])
AC_CHECK_LIB([SDL_gfx], [pixelColor])
fi
if test "x$needsdlimage" = "xyes" ; then
AC_CHECK_LIB([SDL_image], [IMG_Load])
fi
if test "x$needlibtool" = "xyes" ; then
AC_CHECK_LIB([ltdl], [lt_dlinit])
fi
if test "x$needtaglib" = "xyes" ; then
PKG_CHECK_MODULES([taglib], [taglib >= 1.4])
fi
if test "x$needglibmm" = "xyes" ; then
PKG_CHECK_MODULES([glibmm], [glibmm-2.4])
fi
if test "x$needgl" = "xyes" ; then
AC_CHECK_LIB([GL], [glIndex])
fi
if test "x$needglu" = "xyes" ; then
AC_CHECK_LIB([GLU], [gluDisk])
fi
if test "x$needmysql" = "xyes" ; then
AC_SUBST([mysqlcppflags], [`mysql_config --cflags`])
AC_SUBST([mysqlldflags], [`mysql_config --libs`])
fi
if test "x$needsqlite" = "xyes" ; then
PKG_CHECK_MODULES([sqlite3], [sqlite3 >= 3.3])
fi
if test "x$needcurl" = "xyes" ; then
PKG_CHECK_MODULES([curl], [libcurl >= 7.15.0])
fi
if test "x$needqt44" = "xyes" ; then
PKG_CHECK_MODULES([QtCore], [QtCore >= 4.4.0])
PKG_CHECK_MODULES([QtGui], [QtGui >= 4.4.0])
fi
if test "x$needphonon" = "xyes" ; then
PKG_CHECK_MODULES([QtPhonon], [QtPhonon >= 4.4.0])
fi
if test "x$needxine" = "xyes" ; then
PKG_CHECK_MODULES([xine], [libxine >= 1.1.4])
fi
if test "x$needgstreamer" = "xyes" ; then
PKG_CHECK_MODULES([gstreamer], [gstreamer-0.10 >= 0.10.12])
fi
# Checks for header files.
AC_PATH_X
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h syslog.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_C_VOLATILE
# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_PROG_GCC_TRADITIONAL
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([bzero dup2 gethostbyname inet_ntoa memset putenv select socket sqrt strchr strerror])
dnl src/plugins/client-plugins/HDRadioController/docs/latex/Makefile
AC_CONFIG_FILES([Makefile
src/Makefile
src/core/Makefile
src/core/nghostcore.pc
src/dao/Makefile
src/dao/nghostdao.pc
src/gui2/Makefile
src/gui2/nghostgui2.pc
src/gui3/Makefile
src/gui3/nghostgui3.pc
src/log/Makefile
src/log/nghostlog.pc
src/net/Makefile
src/net/nghostnet.pc
src/plugins/Makefile
src/plugins/client-plugins/HDRadioController/Makefile
src/plugins/client-plugins/HDRadioController/src/Makefile
src/plugins/client-plugins/Makefile
src/plugins/db/Makefile
src/plugins/db/mysql/Makefile
src/plugins/db/sqlite/Makefile
src/plugins/download/Makefile
src/plugins/download/curl/Makefile
src/plugins/interface/Makefile
src/plugins/interface/nghostplugins.pc
src/plugins/media/Makefile
src/plugins/media/artgrabber/Makefile
src/plugins/media/artgrabber/n2o_2k/Makefile
src/plugins/media/audio/Makefile
src/plugins/media/audio/gstreamer/Makefile
src/plugins/media/video/Makefile
src/plugins/media/video/ipc/Makefile
src/plugins/media/video/phonon/Makefile
src/plugins/media/video/xine/Makefile
src/plugins/sample/Makefile])
AC_CONFIG_SUBDIRS([src/plugins/client-plugins/JoystickInput])
AC_OUTPUT