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 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
# Init autoconf.
# --------------
AC_INIT([QuesoGLC], [0.7.1],
[quesoglc-general@lists.sourceforge.net],
[quesoglc])
AC_CONFIG_HEADER([include/qglc_config.h:include/qglc_config.hin])
AC_CONFIG_SRCDIR([src/global.c])
AC_CONFIG_AUX_DIR([build])
# Optional parameters definition.
# -------------------------------
AC_ARG_WITH([fribidi],
AC_HELP_STRING([--with-fribidi],
[use the FriBiDi system library @<:@default=yes@:>@]),
[], [with_fribidi=yes]
)
AC_ARG_WITH([glew],
AC_HELP_STRING([--with-glew],
[use the GLEW system library @<:@default=yes@:>@]),
[], [with_glew=yes]
)
AC_ARG_ENABLE([executables],
AC_HELP_STRING([--enable-executables],
[build example and test executables @<:@default=yes@:>@]),
[], [enable_executables=yes]
)
# Init automake.
# --------------
AM_INIT_AUTOMAKE([dist-bzip2])
# Checks for programs.
# --------------------
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
# Checks for multithreading support.
# ----------------------------------
ACX_PTHREAD
CC="$PTHREAD_CC"
# Checks for TLS support.
# -----------------------
AX_CHECK_TLS
# Checks for typedefs, structures, and compiler characteristics.
# --------------------------------------------------------------
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
# Checks for header files.
# ------------------------
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h unistd.h], [],
[AC_MSG_ERROR([Unable to locate a required header])])
# Checks for C library features.
# ------------------------------
case $target_alias in
mingw*) ;;
*)
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_REALLOC
;;
esac
AC_FUNC_STAT
AC_CHECK_FUNCS([atexit memmove memset strdup])
AC_CHECK_LIB([m], [sqrt])
# Checks for font libraries.
# --------------------------
AX_CHECK_FREETYPE2
if (test "x$no_ft2" = "xyes"); then
AC_MSG_ERROR([Unable to locate the required FreeType library])
fi
AC_CHECK_LIB(freetype, FTC_Manager_New,
AC_DEFINE([HAVE_FT_CACHE], [1], [Define if FreeType supports the caching routines]))
AX_CHECK_FONTCONFIG
if (test "x$no_fc" = "xyes"); then
AC_MSG_ERROR([Unable to locate the required Fontconfig library])
fi
# Checks for Unicode libraries.
# -----------------------------
if (test "x$with_fribidi" = "xyes"); then
AX_CHECK_FRIBIDI
if (test "x$no_fribidi" = "xyes"); then
AC_MSG_NOTICE([FriBiDi will be built and embedded])
fi
else
no_fribidi="yes"
fi
if (test "x$no_fribidi" = "xyes"); then
FRIBIDI_OBJ="libGLC_la-fribidi.lo libGLC_la-fribidi_char_type.lo \
libGLC_la-fribidi_mirroring.lo libGLC_la-fribidi_types.lo"
fi
# Checks for OpenGL and related libraries.
# ----------------------------------------
AX_CHECK_GL
if (test "x$no_gl" = "xyes"); then
AC_MSG_ERROR([OpenGL not found])
fi
AX_CHECK_GLU
if (test "x$no_glu" = "xyes"); then
AC_MSG_ERROR([GLU library not found])
fi
# Checks for GLEW library.
# ------------------------
if (test "x$with_glew" = "xyes"); then
AX_CHECK_GLEW
if (test "x$no_glew" = "xyes"); then
AC_MSG_NOTICE([GLEW will be built and embedded])
fi
else
no_glew="yes"
fi
if (test "x$no_glew" = "xyes"); then
GLEW_CFLAGS="-DGLEW_MX"
GLEW_OBJ="libGLC_la-glew.lo"
fi
# Special flags for MinGW32 build.
# --------------------------------
case $target_alias in
mingw*)
if (test "x$enable_static" = "xyes"); then
GLEW_CFLAGS+=" -DGLEW_STATIC"
else
GLEW_CFLAGS+=" -DGLEW_BUILD"
fi
;;
esac
# Determine whether to build (or not) test and examples executables.
# ------------------------------------------------------------------
if (test "x$enable_executables" = "xyes"); then
AX_CHECK_GLUT
if (test "x$no_glut" = "xyes"); then
AC_MSG_WARN([The GLUT library could not be found : example programs and \
some tests will not be built])
EXECUTABLES="tests"
else
EXECUTABLES="tests examples"
case $target_alias in
mingw*)
TESTS_WITH_GLUT="test1 test5 test6 test7 test8 test9.1 test9.2 test9.3 \
test9.4 test9.5 test9.6 test9.7 test9.8 test10 \
testcontex testfont testmaster testrender"
;;
*)
TESTS_WITH_GLUT="test1 test2 test3 test5 test6 test7 test8 test9.1 \
test9.2 test9.3 test9.4 test9.5 test9.6 test9.7 test9.8 \
test10 testcontex testfont testmaster testrender"
;;
esac
fi
fi
# Output.
# -------
AC_CONFIG_FILES([Makefile
build/Makefile
include/Makefile
tests/Makefile
examples/Makefile])
AC_SUBST(EXECUTABLES)
AC_SUBST(TESTS_WITH_GLUT)
AC_SUBST(FRIBIDI_OBJ)
AC_SUBST(GLEW_OBJ)
AC_SUBST(GLEW_CFLAGS)
AC_OUTPUT
|