Hash :
bf53f39b
Author :
Date :
2011-05-21T09:51:36
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
dnl Minimum version of autoconf required. Should coincide with the
dnl setting in the autogen.sh script.
AC_PREREQ(2.58)
AC_INIT(FTGL, 2.2.0, [https://sourceforge.net/projects/ftgl/], ftgl)
AC_CONFIG_SRCDIR(src/FTPoint.cpp)
AC_CONFIG_AUX_DIR(.auto)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.6 no-define dist-zip dist-bzip2])
AM_CONFIG_HEADER(config.h)
FTGL_PROG_CXX
LT_MAJOR="2"
LT_MINOR="2"
LT_MICRO="0"
AC_SUBST(LT_MAJOR)
AC_SUBST(LT_MINOR)
AC_SUBST(LT_MICRO)
LT_VERSION="$LT_MAJOR:$LT_MINOR:$LT_MICRO"
AC_SUBST(LT_VERSION)
# make sure ECHO and ECHO_N got defined and substituted
if test "x$ECHO" = "x" ; then
ECHO=echo
AC_MSG_NOTICE([ECHO was not defined by configure so defining manually])
fi
AC_SUBST(ECHO)
AC_SUBST(ECHO_N)
AC_PROG_LIBTOOL
AC_PROG_INSTALL
# Checks for typedefs, structures, and compiler characteristics.
dnl These don't mix with C++
dnl AC_C_CONST
dnl AC_C_INLINE
AM_PROG_CC_C_O
FTGL_CPP_FUNC
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADER([stdlib.h])
# Check for system functions
AC_CHECK_FUNCS(wcsdup)
AC_CHECK_FUNCS(strndup)
# Checks for libraries.
AC_PATH_X
AC_CHECK_FT2([9.0.3],[],
[AC_MSG_ERROR([FreeType2 is required to compile this library])])
AC_PATH_XTRA
FTGL_CHECK_GL
FTGL_CHECK_GLUT
FTGL_CHECK_FONT
PKG_CHECK_MODULES(CPPUNIT, cppunit, [CPPUNIT="yes"], [CPPUNIT="no"])
AC_MSG_RESULT($CPPUNIT)
AM_CONDITIONAL(HAVE_CPPUNIT, test "x$CPPUNIT" != "xno")
dnl search the include directory (required for non-srcdir builds).
dnl should come after the system services checks otherwise headers
dnl may conflict.
CPPFLAGS="$CPPFLAGS -I\${top_srcdir}/src"
# Warning flags
BC_COMPILER_AND_LINKER_RECOGNIZES([-W -Wall -Wundef -Wfloat-equal -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -Winline -Waggregate-return], [warning])
BC_COMPILER_AND_LINKER_RECOGNIZES([-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs], [warncflags], [no])
if test "x$bc_warncflags_works" = "xyes" ; then
CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
fi
AC_ARG_ENABLE(doc,
[ --enable-doc build documentation (needs doxygen and LaTeX)])
# Build HTML documentatin?
DOXYGEN=no
if test "${enable_doc}" != "no"; then
AC_PATH_PROG(DOXYGEN, doxygen, no)
fi
AM_CONDITIONAL(HAVE_DOXYGEN, test "x$DOXYGEN" != "xno")
# Build PDF documentation?
LATEX=no
if test "${enable_doc}" != "no"; then
AC_PATH_PROG(LATEX, pdflatex, no)
AC_PATH_PROG(KPSEWHICH, kpsewhich, no)
AC_PATH_PROG(DVIPS, dvips, no)
AC_PATH_PROG(CONVERT, convert, no)
AC_PATH_PROG(EPSTOPDF, epstopdf, no)
AC_PATH_PROGS(SED, gsed sed, no)
if test "${DVIPS}" = "no" -o "${KPSEWHICH}" = "no" -o "${EPSTOPDF}" = "no" \
-o "${CONVERT}" = "no" -o "${SED}" = "no"; then
LATEX="no"
fi
fi
if test "x${LATEX}" != "xno"; then
AC_MSG_CHECKING(for a4.sty and a4wide.sty)
if "${KPSEWHICH}" a4.sty >/dev/null 2>&1; then
if "${KPSEWHICH}" a4wide.sty >/dev/null 2>&1; then
AC_MSG_RESULT(yes)
else
LATEX="no"
AC_MSG_RESULT(no)
fi
else
LATEX="no"
AC_MSG_RESULT(no)
fi
fi
AM_CONDITIONAL(HAVE_LATEX, test "x${LATEX}" != "xno")
# make sure ECHO and ECHO_N got defined and substituted
if test "x$ECHO" = "x" ; then
ECHO=echo
AC_MSG_NOTICE([ECHO was not defined by configure so defining manually])
fi
AC_SUBST(ECHO)
AC_SUBST(ECHO_N)
AC_CONFIG_FILES([
ftgl.pc
])
AC_CONFIG_FILES([
Makefile
demo/Makefile
docs/Makefile
docs/doxygen.cfg
msvc/Makefile
src/Makefile
test/Makefile
])
AC_OUTPUT
dnl
dnl Expand the variables for summary reporting
dnl
prefix=`eval "echo $prefix"`
prefix=`eval "echo $prefix"`
bindir=`eval "echo $bindir"`
bindir=`eval "echo $bindir"`
sysconfdir=`eval "echo $sysconfdir"`
sysconfdir=`eval "echo $sysconfdir"`
mandir=`eval "echo $mandir"`
mandir=`eval "echo $mandir"`
datadir=`eval "echo $datadir"`
datadir=`eval "echo $datadir"`
AC_MSG_RESULT([Done.])
AC_MSG_RESULT([])
AC_MSG_RESULT([FTGL configured with the following settings:])
AC_MSG_RESULT([])
AC_MSG_RESULT([ Prefix: ${prefix}])
AC_MSG_RESULT([ Binaries: ${bindir}])
AC_MSG_RESULT([Configuration files: ${sysconfdir}])
AC_MSG_RESULT([ Data files: ${datadir}])
AC_MSG_RESULT([])
AC_MSG_RESULT([CC = ${CC}])
AC_MSG_RESULT([CXX = ${CXX}])
if test "x$CFLAGS" != "x" ; then
AC_MSG_RESULT([CFLAGS = ${CFLAGS}])
fi
if test "x$CXXFLAGS" != "x" ; then
AC_MSG_RESULT([CXXFLAGS = ${CXXFLAGS}])
fi
if test "x$CPPFLAGS" != "x" ; then
AC_MSG_RESULT([CPPFLAGS = ${CPPFLAGS}])
fi
if test "x$LDFLAGS" != "x" ; then
AC_MSG_RESULT([LDFLAGS = ${LDFLAGS}])
fi
if test "x$LIBS" != "x" ; then
AC_MSG_RESULT([LIBS = ${LIBS}])
fi
AC_MSG_RESULT([])
AC_MSG_RESULT([---])
AC_MSG_RESULT([$0 complete, type 'make' to begin building])
AC_MSG_RESULT([])
# Local Variables:
# tab-width: 8
# mode: autoconf
# sh-indentation: 2
# sh-basic-offset: 2
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8