forked from knowknowledge/Epiar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
136 lines (117 loc) · 3.31 KB
/
configure.in
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
PACKAGE=epiar
VERSION=0.4.2
dnl Init
AC_INIT(README)
AC_PREREQ(2.50)
dnl Detect the canonical host and target build environment
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_CONFIG_HEADER(config.h)
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB
AC_LANG(C++)
dnl Check for a C++ compiler
if test "$ac_cv_prog_cxx_g" == no
then
AC_MSG_ERROR([Cannot find a working C++ compiler])
fi
dnl Check for Freetype
dnl case "$target" in
dnl *-*-linux* | *-*-cygwin* | *-*-mingw32* | *-*-freebsd* | *-apple-darwin*)
dnl PKG_CHECK_MODULES([freetype2], [freetype2 >= 9.22])
dnl CFLAGS="$CFLAGS $freetype2_CFLAGS"
dnl LIBS="$LIBS $freetype2_LIBS"
dnl esac
dnl Some additional flags for Freetype
dnl case "$target" in *-*-linux*)
dnl CFLAGS="$CFLAGS -I/usr/include/freetype2"
dnl esac
dnl case "$target" in *-*-freebsd*)
dnl CFLAGS="$CFLAGS -I/usr/local/include/freetype2"
dnl esac
dnl case "$target" in *-apple-darwin*)
dnl CFLAGS="$CFLAGS -I/opt/local/include/ -I/opt/local/include/freetype2"
dnl esac
dnl Include FTGL
case "$target" in
*-*-linux* | *-*-cygwin* | *-*-mingw32* | *-*-freebsd* | *-apple-darwin*)
PKG_CHECK_MODULES([FTGL], [ftgl >= 2.1.3])
CFLAGS="$CFLAGS $FTGL_CFLAGS"
LIBS="$LIBS $FTGL_LIBS"
esac
dnl Check for libxml2
case "$target" in
*-*-linux* | *-*-cygwin* | *-*-mingw32* | *-*-freebsd* | *-apple-darwin*)
PKG_CHECK_MODULES([libxml2], [libxml-2.0 >= 2.7.6])
CFLAGS="$CFLAGS $libxml2_CFLAGS"
LIBS="$LIBS $libxml2_LIBS"
esac
dnl Check for SDL
SDL_VERSION=1.2.10
case "$target" in
*-*-linux* | *-*-cygwin* | *-*-mingw32* | *-*-freebsd*)
AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
CFLAGS="$CFLAGS $SDL_CFLAGS -DCOMP_GCC"
LIBS="$LIBS $SDL_LIBS"
esac
case "$target" in
*-apple-darwin*)
CFLAGS="$CFLAGS -DCOMP_GCC -I/Developer/Library/Frameworks/SDL.Framework/Headers -I/System/Library/Frameworks/OpenGL.framework/Headers"
LIBS="$LIBS -framework SDL -framework OpenGL -framework Cocoa SDLMain.m"
esac
dnl Check for SDL_image
case "$target" in
*-*-linux* | *-*-cygwin* | *-*-mingw32* | *-*-freebsd*)
PKG_CHECK_MODULES([SDL_image], [SDL_image >= 1.2.10])
CFLAGS="$CFLAGS $SDL_image_CFLAGS"
LIBS="$LIBS $SDL_image_LIBS"
esac
case "$target" in
*-apple-darwin*)
CFLAGS="$CFLAGS -I/Developer/Library/Frameworks/SDL_image.Framework/Headers"
LIBS="$LIBS -framework SDL_image"
esac
dnl Check for SDL_mixer
case "$target" in
*-*-linux* | *-*-cygwin* | *-*-mingw32* | *-*-freebsd*)
PKG_CHECK_MODULES([SDL_mixer], [SDL_mixer >= 1.2.11])
CFLAGS="$CFLAGS $SDL_mixer_CFLAGS"
LIBS="$LIBS $SDL_mixer_LIBS"
esac
case "$target" in
*-apple-darwin*)
CFLAGS="$CFLAGS -I/Library/Frameworks/SDL_mixer.Framework/Headers"
LIBS="$LIBS -framework SDL_mixer"
esac
dnl Set MS Windows specific options - For afont and ntohl (Win32 provides this through Winsock)
case "$target" in
*-*-cygwin* | *-*-mingw32*)
LIBS="$LIBS -lwsock32 -lz"
;;
esac
dnl Set MinGW-specific options
case "$target" in
*-*-mingw32*)
LIBS="$LIBS -lopengl32"
;;
esac
dnl Set Unix specific options
case "$target" in
*-*-linux* | *-*-freebsd*)
CFLAGS="$CFLAGS -DUNIX -I/usr/include/GL"
LIBS="$LIBS -lGL -lGLU -lz"
;;
esac
dnl Set OS X specific options
case "$target" in
*-apple-darwin*)
CFLAGS="$CFLAGS -DDARWIN"
LIBS="$LIBS"
;;
esac
CFLAGS="$CFLAGS -Wall"
CXXFLAGS="$CFLAGS"
AC_OUTPUT([Makefile])