158 lines
3.5 KiB
Plaintext
158 lines
3.5 KiB
Plaintext
|
AC_PREREQ(2.13)
|
||
|
|
||
|
AC_INIT(src/main.cpp)
|
||
|
|
||
|
AM_INIT_AUTOMAKE(prozgui, 2.0.4)
|
||
|
|
||
|
AM_CONFIG_HEADER(config.h)
|
||
|
|
||
|
AC_LANG_CPLUSPLUS
|
||
|
AC_ISC_POSIX
|
||
|
|
||
|
AC_CONFIG_SUBDIRS(libprozilla)
|
||
|
|
||
|
AC_ARG_WITH(fltk-libs, [ --with-fltk-libs set directory for FLTK library],
|
||
|
LDFLAGS="-L$withval $LDFLAGS",)
|
||
|
|
||
|
AC_ARG_WITH(fltk-includes, [ --with-fltk-includes set directory for FLTK includes],
|
||
|
CFLAGS="-I$withval $CFLAGS"
|
||
|
CXXFLAGS="-I$withval $CXXFLAGS",)
|
||
|
|
||
|
|
||
|
dnl LDLIBS="-lX11 -lXext -lm"
|
||
|
AC_CANONICAL_HOST
|
||
|
|
||
|
dnl ---------------------------------------------------------------------------
|
||
|
dnl Checks for programs.
|
||
|
dnl ---------------------------------------------------------------------------
|
||
|
AC_PROG_CC
|
||
|
AC_PROG_CXX
|
||
|
AC_PROG_CPP
|
||
|
AC_PROG_INSTALL
|
||
|
AC_CHECK_PROG(UNAME,uname,uname,:)
|
||
|
AM_ENABLE_STATIC
|
||
|
AM_DISABLE_SHARED
|
||
|
AC_PROG_LIBTOOL
|
||
|
dnl -------------
|
||
|
dnl gettext stuff
|
||
|
dnl -------------
|
||
|
ALL_LINGUAS="pt_BR nl ro it fr"
|
||
|
AM_GNU_GETTEXT
|
||
|
|
||
|
|
||
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||
|
AC_C_CONST
|
||
|
AC_HEADER_TIME
|
||
|
AC_STRUCT_TM
|
||
|
|
||
|
|
||
|
|
||
|
dnl Check for libraries...
|
||
|
dnl LDFLAGS="${LDFLAGS:=}"
|
||
|
dnl AC_SUBST(LDFLAGS)
|
||
|
|
||
|
dnl Checks for header files.
|
||
|
AC_HEADER_STDC
|
||
|
AC_CHECK_HEADERS(string.h sys/time.h sys/types.h unistd.h)
|
||
|
|
||
|
|
||
|
dnl Checks for string functions.
|
||
|
AC_CHECK_FUNCS(strdup)
|
||
|
AC_CHECK_FUNCS(strcasecmp)
|
||
|
AC_CHECK_FUNCS(strncasecmp)
|
||
|
|
||
|
dnl ---------------------------------------------------------------------------
|
||
|
dnl Checks for libraries.
|
||
|
dnl ---------------------------------------------------------------------------
|
||
|
|
||
|
AC_TYPE_SIZE_T
|
||
|
TYPE_SOCKLEN_T
|
||
|
|
||
|
|
||
|
dnl ==============
|
||
|
dnl CHECK FLTK LIB
|
||
|
dnl ==============
|
||
|
AC_CHECK_HEADERS(FL/Fl.H, have_fltk=yes, have_fltk=no)
|
||
|
|
||
|
dnl AC_SUBST(FLTK_LIBS)
|
||
|
dnl AC_SUBST(FLTK_DIR)
|
||
|
|
||
|
dnl Check for GUI libraries...
|
||
|
OLDLIBS="$LIBS"
|
||
|
|
||
|
|
||
|
AC_PATH_X
|
||
|
|
||
|
if test "$x_libraries" = "/usr/lib"; then
|
||
|
echo "Ignoring X library directory \"$x_libraries\" requested by configure."
|
||
|
x_libraries="NONE"
|
||
|
fi
|
||
|
|
||
|
if test ! "$x_libraries" = "NONE" -a ! "$x_libraries" = ""; then
|
||
|
LDFLAGS="$LDFLAGS -L$x_libraries"
|
||
|
if test "$uname" = "SunOS"; then
|
||
|
LDFLAGS="$LDFLAGS -R$x_libraries"
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
|
||
|
if test "$x_includes" = "/usr/include"; then
|
||
|
echo "Ignoring X include directory \"$x_includes\" requested by configure."
|
||
|
x_includes="NONE"
|
||
|
fi
|
||
|
|
||
|
if test ! "$x_includes" = "NONE" -a ! "$x_includes" = ""; then
|
||
|
CFLAGS="$CFLAGS -I$x_includes"
|
||
|
CXXFLAGS="$CXXFLAGS -I$x_includes"
|
||
|
fi
|
||
|
|
||
|
|
||
|
case $host in
|
||
|
*-*-freebsd*)
|
||
|
THREAD_LIBS="-pthread"
|
||
|
;;
|
||
|
*-*-openbsd*)
|
||
|
THREAD_LIBS="-pthread"
|
||
|
;;
|
||
|
*)
|
||
|
AC_CHECK_LIB(pthread, pthread_create,
|
||
|
THREAD_LIBS="-lpthread",
|
||
|
AC_MSG_ERROR([** The pthread library is not installed.**]))
|
||
|
;;
|
||
|
esac
|
||
|
AC_SUBST(THREAD_LIBS)
|
||
|
|
||
|
|
||
|
|
||
|
AC_CHECK_LIB(m,pow)
|
||
|
|
||
|
AC_CHECK_LIB(X11,XOpenDisplay)
|
||
|
AC_CHECK_LIB(Xext,XdbeQueryExtension)
|
||
|
|
||
|
AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData)
|
||
|
dnl Check FLTK by itself
|
||
|
AC_CHECK_LIB(fltk,numericsort)
|
||
|
|
||
|
dnl Check FLTK + OpenGL to see if that works...
|
||
|
if test "$ac_cv_lib_fltk_numericsort" = no; then
|
||
|
unset ac_cv_lib_fltk_numericsort
|
||
|
AC_CHECK_LIB(GL,glEnable)
|
||
|
AC_CHECK_LIB(fltk,numericsort)
|
||
|
fi
|
||
|
|
||
|
dnl AC_CHECK_LIB(fltk,main)
|
||
|
|
||
|
AC_PATH_XTRA
|
||
|
if test "$X_PRE_LIBS" != ""; then
|
||
|
echo "Ignoring libraries \"$X_PRE_LIBS\" requested by configure."
|
||
|
fi
|
||
|
if test "$X_LIBS" = " -L/usr/lib"; then
|
||
|
echo "Ignoring X library directory \"$X_LIBS\" requested by
|
||
|
configure."
|
||
|
X_LIBS=""
|
||
|
fi
|
||
|
|
||
|
|
||
|
CXXFLAGS="-Wall -ggdb -D_REENTRANT"
|
||
|
AC_OUTPUT(Makefile src/Makefile man/Makefile intl/Makefile po/Makefile.in)
|