| 1 |
AC_INIT(agg, 2.7.0) |
| 2 |
AC_CONFIG_SRCDIR(src/agg_arc.cpp) |
| 3 |
AC_CANONICAL_TARGET |
| 4 |
AC_CONFIG_HEADERS(include/config.h) |
| 5 |
AM_INIT_AUTOMAKE |
| 6 |
|
| 7 |
|
| 8 |
dnl Checks for programs. |
| 9 |
AC_PROG_CC |
| 10 |
AC_PROG_CXX |
| 11 |
AC_ISC_POSIX |
| 12 |
dnl AM_C_PROTOTYPES |
| 13 |
dnl if test "x$U" != "x"; then |
| 14 |
dnl AC_MSG_ERROR(Compiler not ANSI compliant) |
| 15 |
dnl fi |
| 16 |
AM_PROG_LIBTOOL |
| 17 |
AC_PROG_INSTALL |
| 18 |
|
| 19 |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 20 |
AC_C_CONST |
| 21 |
|
| 22 |
AC_ARG_ENABLE(examples, |
| 23 |
AC_HELP_STRING([--enable-examples],[Antigrain examples])) |
| 24 |
AM_CONDITIONAL(ENABLE_EXAMPLES,test x$enable_examples != xno) |
| 25 |
|
| 26 |
AC_ARG_ENABLE(ctrl, |
| 27 |
AC_HELP_STRING([--enable-ctrl],[a gui libray used in examples])) |
| 28 |
|
| 29 |
AC_ARG_ENABLE(platform, |
| 30 |
AC_HELP_STRING([--enable-platform],[portable platform layers])) |
| 31 |
|
| 32 |
if test x$enable_examples != xno ; then |
| 33 |
enable_platform="yes" |
| 34 |
fi |
| 35 |
if test x$enable_platform != xno ; then |
| 36 |
enable_ctrl="yes" |
| 37 |
fi |
| 38 |
AM_CONDITIONAL(ENABLE_CTRL,test x$enable_ctrl != xno) |
| 39 |
|
| 40 |
# used as platform library in examples: |
| 41 |
# todo, make the PREFERED_PLATFORM selectable, after the set of possible |
| 42 |
# Platforms to link the examples have been evaluated. |
| 43 |
PREFERED_PLATFORM=X11 |
| 44 |
case "$host" in |
| 45 |
*darwin* ) |
| 46 |
OSX_LIBS="-framework Carbon -framework QuickTime" |
| 47 |
OSX_CFLAGS="-I/System/Library/Frameworks/Carbon.framework/Headers -I/System/Library/Frameworks/QuickTime.framework/Headers " |
| 48 |
AC_SUBST(OSX_CFLAGS) |
| 49 |
AC_SUBST(OSX_LIBS) |
| 50 |
osx_host=yes |
| 51 |
PREFERED_PLATFORM=mac |
| 52 |
;; |
| 53 |
dnl #### Check if we are compiling for win32 ##### |
| 54 |
*mingw*) |
| 55 |
win32_host=yes |
| 56 |
WINDOWS_LIBS=-lgdi32 |
| 57 |
WINDOWS_CFLAGS= |
| 58 |
AC_SUBST(WINDOWS_CFLAGS) |
| 59 |
AC_SUBST(WINDOWS_LIBS) |
| 60 |
PREFERED_PLATFORM=win32 |
| 61 |
;; |
| 62 |
esac |
| 63 |
AM_CONDITIONAL(ENABLE_WIN32,[test x$win32_host = xyes -a x$enable_platform != xno ]) |
| 64 |
AM_CONDITIONAL(ENABLE_OSX,[test x$osx_host = xyes -a x$enable_platform != xno ]) |
| 65 |
dnl then enable font_win32tt |
| 66 |
AC_ARG_ENABLE(win32tt, |
| 67 |
AC_HELP_STRING([--enable-win32tt],[Win32 TrueType font support library]), |
| 68 |
enable_tt=$enable_win32tt, |
| 69 |
enable_tt=$win32_host) |
| 70 |
AM_CONDITIONAL(ENABLE_WIN32_TT, test x$enable_tt = xyes ) |
| 71 |
|
| 72 |
dnl ######### Check for FT2: ##################### |
| 73 |
ft_enabled="" |
| 74 |
PKG_CHECK_MODULES([FREETYPE], |
| 75 |
freetype2, |
| 76 |
[ft_enabled="yes"], |
| 77 |
AC_MSG_WARN([*** Freetype2 not found! Building without font library.]) |
| 78 |
) |
| 79 |
AC_ARG_ENABLE(freetype, |
| 80 |
AC_HELP_STRING([--enable-freetype],[freetype font support library]), |
| 81 |
ft_enabled=$enable_freetype) |
| 82 |
|
| 83 |
AM_CONDITIONAL(ENABLE_FT,[test xyes = x$ft_enabled]) |
| 84 |
dnl ############################################### |
| 85 |
|
| 86 |
|
| 87 |
dnl ######### Ask for GPC: ####################### |
| 88 |
AC_ARG_ENABLE(gpc, |
| 89 |
AC_HELP_STRING([--enable-gpc],[gpc polygon clipper library]) ) |
| 90 |
|
| 91 |
AM_CONDITIONAL(ENABLE_GPC,[test xyes = x$enable_gpc]) |
| 92 |
dnl ############################################### |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
dnl ######### Check for SDL: ##################### |
| 98 |
dnl the sdl script pollutes our global values: |
| 99 |
temp_LIBS="$LIBS" |
| 100 |
temp_CFLAGS="$CFLAGS" |
| 101 |
temp_CXXFLAGS="$CXXFLAGS" |
| 102 |
sdl_enabled="" |
| 103 |
SDL_VERSION=1.2.0 |
| 104 |
AM_PATH_SDL($SDL_VERSION, |
| 105 |
[sdl_enabled="yes"], |
| 106 |
AC_MSG_WARN([*** SDL version $SDL_VERSION not found! Omitting sdl layer.]) |
| 107 |
) |
| 108 |
dnl ### Restore old values |
| 109 |
CFLAGS=$temp_CFLAGS |
| 110 |
CXXFLAGS=$temp_CXXFLAGS |
| 111 |
LIBS=$temp_LIBS |
| 112 |
dnl ### the sdl script already does that: |
| 113 |
dnl AC_SUBST(SDL_CFLAGS) |
| 114 |
dnl AC_SUBST(SDL_LIBS) |
| 115 |
AM_CONDITIONAL(ENABLE_SDL,[test xyes = x$sdl_enabled -a xno != x$enable_platform -a x$win32_host != xyes]) |
| 116 |
dnl ############################################### |
| 117 |
|
| 118 |
|
| 119 |
dnl ######### Checking for X11: ################## |
| 120 |
AC_PATH_X |
| 121 |
if test "$no_x" = "yes"; then |
| 122 |
AC_MSG_WARN([*** X11 not found! Omitting X11 layer.]) |
| 123 |
fi |
| 124 |
AM_CONDITIONAL(ENABLE_X11,[test x$no_x = x -a xno != x$enable_platform -a x$win32_host != xyes]) |
| 125 |
AC_SUBST(x_includes) |
| 126 |
AC_SUBST(x_libraries) |
| 127 |
dnl ############################################### |
| 128 |
|
| 129 |
dnl Settung up library version |
| 130 |
AGG_LIB_VERSION="2:7:0" |
| 131 |
dnl current-´ / / |
| 132 |
dnl revision--´ / |
| 133 |
dnl age---´ |
| 134 |
dnl Update the version information only immediately before a public release of antigrain |
| 135 |
dnl If the library source code has changed, increment revision (c:r:a becomes c:r+1:a). |
| 136 |
dnl If any interfaces have been added, removed, or changed since the last update, |
| 137 |
dnl increment current, and set revision to 0. |
| 138 |
dnl If any interfaces have been added since the last public release, then increment age. |
| 139 |
dnl If any interfaces have been removed since the last public release, then set age to 0. |
| 140 |
|
| 141 |
AC_SUBST(AGG_LIB_VERSION) |
| 142 |
AC_SUBST(PREFERED_PLATFORM) |
| 143 |
|
| 144 |
|
| 145 |
AC_OUTPUT( |
| 146 |
Makefile |
| 147 |
libagg.pc |
| 148 |
gpc/Makefile |
| 149 |
font_freetype/Makefile |
| 150 |
font_win32_tt/Makefile |
| 151 |
src/Makefile |
| 152 |
src/ctrl/Makefile |
| 153 |
src/platform/Makefile |
| 154 |
src/platform/X11/Makefile |
| 155 |
src/platform/sdl/Makefile |
| 156 |
src/platform/mac/Makefile |
| 157 |
src/platform/win32/Makefile |
| 158 |
src/platform/BeOS/Makefile |
| 159 |
src/platform/AmigaOS/Makefile |
| 160 |
include/Makefile |
| 161 |
include/ctrl/Makefile |
| 162 |
include/util/Makefile |
| 163 |
include/platform/Makefile |
| 164 |
examples/Makefile |
| 165 |
) |
| 166 |
|