This repository was archived by the owner on Dec 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfigure.in
More file actions
192 lines (167 loc) · 5.41 KB
/
configure.in
File metadata and controls
192 lines (167 loc) · 5.41 KB
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/kits/interface/View.cpp)
AC_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
dnl Determine our platform.
AC_CANONICAL_HOST
dnl Checks for libraries.
AC_CHECK_LIB(stdc, printf)
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
case "$host" in
*darwin*) LIBEXT="dylib"
SHAREDLINK="-dynamiclib"
STRCASESTROBJ="string_helper.o"
FONTDIR="/Library/Fonts/cosmoe"
;;
*) LIBEXT="so"
SHAREDLINK="-shared"
STRCASESTROBJ=
FONTDIR="/usr/share/fonts/ttf/cosmoe"
;;
esac
ABS_TOPDIR=`pwd`
AC_CHECK_LIB(pthread, pthread_kill, ,
AC_MSG_ERROR([
*** Cosmoe requires a libpthread with pthread_kill support.]))
AC_CHECK_LIB(dl, dlopen, ,
AC_MSG_ERROR([
*** Cosmoe requires libdl.]))
AC_CHECK_HEADER(png.h,
AC_DEFINE(COSMOE_PNG, [], [PNG libraries/headers are available]),
AC_MSG_WARN([
*** libjpeg header files not found. PNG translator will not be built.]))
AC_CHECK_LIB(png, png_read_info, ,
AC_MSG_ERROR([
*** Cosmoe requires libpng.]),
-lz -lm)
AC_CHECK_HEADER(zlib.h, ,
AC_MSG_ERROR([
*** Cosmoe requires the libz header files to support libpng.]))
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, ,
AC_MSG_ERROR([
*** Cosmoe requires libjpeg.]),
-lz -lm)
AC_CHECK_HEADER(jpeglib.h,
AC_DEFINE(COSMOE_JPEG, [], [JPEG libraries/headers are available]),
AC_MSG_WARN([
*** libjpeg header files not found. JPEG translator will not be built.]))
AC_CHECK_HEADER(sys/xattr.h,
AC_DEFINE(COSMOE_ATTRIBUTES, [], [OS has generic filesystem attribute support]),
AC_MSG_WARN([
*** This build of Cosmoe will not support attributes.]))
AC_CHECK_PROG(FREETYPE_CONFIG, freetype-config, yes)
if eval "test x$FREETYPE_CONFIG != xyes"; then
AC_MSG_ERROR([
*** Cosmoe requires libfreetype version 2.0 or later.])
fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
VIDEODRVLIB=""
AC_MSG_CHECKING(whether to enable DirectFB graphics rendering)
AC_ARG_ENABLE(directfb, [ --enable-directfb run Cosmoe on top of DirectFB [default=no]],
if eval "test x$enable_directfb = xyes"; then
AC_MSG_RESULT(yes)
AC_CHECK_PROG(DIRECTFB_CONFIG, directfb-config, yes)
if eval "test x$DIRECTFB_CONFIG != xyes"; then
AC_MSG_ERROR([
*** Cosmoe requires directfb-config (www.directfb.org) when using DirectFB.])
fi
VIDEODRVLIB=`directfb-config --libs`
VIDEODRVOBJ="dfbdriver.o"
VIDEODRVCFLAGS=`directfb-config --cflags`
AC_CHECK_LIB(directfb, DirectFBInit,,AC_MSG_ERROR([
*** Cosmoe requires libDirectFB (www.directfb.org) when configured to use DirectFB.]),
[`directfb-config --libs`])
AC_DEFINE(COSMOE_DIRECTFB, [], [Use DirectFB for graphics output])
else
AC_MSG_RESULT(no)
fi
, AC_MSG_RESULT(no))
AC_MSG_CHECKING(whether to enable SDL graphics rendering)
AC_ARG_ENABLE(sdl, [ --enable-sdl run Cosmoe on top of SDL [default=no]],
if eval "test x$enable_sdl = xyes"; then
AC_MSG_RESULT(yes)
AC_CHECK_PROG(SDL_CONFIG, sdl-config, yes)
if eval "test x$SDL_CONFIG != xyes"; then
AC_MSG_ERROR([
*** Cosmoe requires sdl-config (www.libsdl.org) when configured to use SDL.])
fi
VIDEODRVLIB=`sdl-config --libs`
VIDEODRVOBJ="sdldriver.o"
VIDEODRVCFLAGS=`sdl-config --cflags`
AC_CHECK_LIB(SDL, SDL_Init,,AC_MSG_ERROR([
*** Cosmoe requires libSDL (www.libsdl.org) when configured to use SDL.]),
[`sdl-config --libs`])
INPUTDRV=
AC_DEFINE(COSMOE_SDL, [], [Use SDL for graphics output])
else
AC_MSG_RESULT(no)
fi
, AC_MSG_RESULT(no))
AC_MSG_CHECKING(whether to enable XWindows graphics rendering)
dnl Default to X11 graphics if other graphics method were not chosen
if test -z "$VIDEODRVLIB"; then
VIDEODRVLIB="-L/usr/X11R6/lib -lX11"
VIDEODRVOBJ="x11driver.o"
VIDEODRVCFLAGS=""
AC_MSG_RESULT(yes)
AC_CHECK_LIB(X11, XOpenDisplay,,AC_MSG_ERROR([
*** Cosmoe requires libX11 when configured to use X11.]),[-L/usr/X11R6/lib])
AC_CHECK_HEADER(X11/Xlib.h,,AC_MSG_ERROR([
*** Cosmoe requires X11 development headers when configured to use X11.]),)
AC_DEFINE(COSMOE_XWINDOWS, [], [Use XWindows for graphics output])
else
AC_MSG_RESULT(no)
fi
AC_SUBST(VIDEODRVOBJ)
AC_SUBST(VIDEODRVLIB)
AC_SUBST(VIDEODRVCFLAGS)
AC_SUBST(LIBEXT)
AC_SUBST(SHAREDLINK)
AC_SUBST(INPUTDRV)
AC_SUBST(STRCASESTROBJ)
AC_SUBST(HAS_ATTR_SUPPORT)
AC_SUBST(FONTDIR)
AC_SUBST(ABS_TOPDIR)
AC_OUTPUT([
Makefile
cosmoe.specs
headers/Makefile
src/kits/Makefile
src/apps/Makefile
src/apps/bedate/Makefile
src/apps/guido/Makefile
src/apps/calc/Makefile
src/apps/OpenTracker/tracker/Makefile
src/apps/OpenTracker/deskbar/Makefile
src/apps/pulse/Makefile
src/apps/testharness/Makefile
src/apps/osutils/Makefile
src/servers/registrar/Makefile
src/servers/app/Makefile
src/add-ons/Makefile
src/add-ons/translators/Makefile
src/add-ons/translators/bmptranslator/Makefile
src/add-ons/translators/pngtranslator/Makefile
])
dnl add-ons/translators/jpg2000translator/Makefile
dnl add-ons/translators/jpgtranslator/Makefile
dnl add-ons/translators/libtifftranslator/Makefile
dnl add-ons/translators/pngtranslator/Makefile
dnl add-ons/translators/ppmtranslator/Makefile
dnl add-ons/translators/sgitranslator/Makefile
dnl add-ons/translators/stxttranslator/Makefile
dnl add-ons/translators/tgatranslator/Makefile
dnl add-ons/translators/tifftranslator/Makefile