forked from davidt/Fyre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
160 lines (138 loc) · 4.47 KB
/
configure.ac
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
dnl Process this file with autoconf to create configure.
dnl ################################################################
dnl # Initialize autoconf
dnl ################################################################
AC_INIT(fyre, 1.0.1, [email protected])
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR(config.h.in)
AC_COPYRIGHT([Copyright 2004-2007 David Trowbridge and Micah Dowty])
dnl ################################################################
dnl # Initialize automake
dnl ################################################################
VERSION=1.0.1
PACKAGE=fyre
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_CONFIG_HEADER(config.h)
dnl ################################################################
dnl # Check for some standard stuff
dnl ################################################################
AC_PROG_CC
AC_PROG_CXX
AC_PROG_MAKE_SET
AC_PROG_LN_S
AC_PROG_INSTALL
AC_C_CONST
AC_TYPE_SIZE_T
AC_EXEEXT
AC_FUNC_FORK
AM_BINRELOC
AM_CONDITIONAL([HAVE_BINRELOC], [ test "x$br_cv_binreloc" = "xyes" ])
AC_PATH_PROG(XDGMIME, update-mime-database, no)
if test "x$XDGMIME" = "xno"; then
enable_xdgmime="no"
else
enable_xdgmime="yes"
fi
AM_CONDITIONAL(ENABLE_XDGMIME, test "x$enable_xdgmime" = "xyes")
AC_PATH_PROG(FDODESKTOP, update-desktop-database, no)
if test "x$FDODESKTOP" = "xno"; then
enable_fdodesktop="no"
else
enable_fdodesktop="yes"
fi
AM_CONDITIONAL(ENABLE_FDODESKTOP, test "x$enable_fdodesktop" = "xyes")
pkg_modules="glib-2.0 >= 2.0.0, gtk+-2.0 >= 2.0.0, libglade-2.0 >= 2.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
# Check for windows, enable compiling windows resources if we find it
AC_MSG_CHECKING([for Win32])
case "$host" in
*mingw*)
WIN32_LIBS=fyre-win32-res.o
;;
*)
WIN32_LIBS=
;;
esac
AC_SUBST(WIN32_LIBS)
# Check for getopt. If we're missing it, include our own version
AC_CHECK_FUNC(getopt_long, have_getopt=yes)
AM_CONDITIONAL([HAVE_GETOPT], [test "x$have_getopt" = "xyes"])
# Check for OpenEXR- we support saving OpenEXR files if the library is available
AC_ARG_ENABLE(openexr, [ --disable-openexr build without OpenEXR support])
if test x$enable_openexr != xno; then
PKG_CHECK_MODULES(EXR, OpenEXR, have_exr=yes, have_exr=no)
AC_SUBST(EXR_CFLAGS)
AC_SUBST(EXR_LIBS)
if test "x$have_exr" = "xyes"; then
AC_DEFINE(HAVE_EXR, 1,[compile in OpenEXR support])
fi
AM_CONDITIONAL([HAVE_EXR], [test "x$have_exr" = "xyes"])
else
AM_CONDITIONAL([HAVE_EXR], false)
fi
# Check for gnet, required for cluster and remote control support
AC_ARG_ENABLE(gnet, [ --disable-gnet build without clustering/remote control])
if test x$enable_gnet != xno; then
PKG_CHECK_MODULES(GNET, gnet-2.0, have_gnet=yes, have_gnet=no)
AC_SUBST(GNET_CFLAGS)
AC_SUBST(GNET_LIBS)
if test "x$have_gnet" = "xyes"; then
AC_DEFINE(HAVE_GNET, 1,[compile in gnet support])
fi
AM_CONDITIONAL([HAVE_GNET], [test "x$have_gnet" = "xyes"])
else
AM_CONDITIONAL([HAVE_GNET], false)
fi
dnl # Use wall if we have GCC
dnl # Also disable glibc versions of functions that have faster versions
dnl # versions as gcc inlines. This should speed up trig on some systems.
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -D__NO_INLINE__ -Wall"
fi
dnl # -O3 and -ffast-math should make it go faster on any system
dnl # But Intel icc doesn't have -ffast-math, just -ffast, which is creepy
if test "x$CC" = "xicc"; then
CFLAGS="$CFLAGS -O3"
else
CFLAGS="$CFLAGS -O3 -ffast-math"
fi
dnl ### FIXME
dnl # -march=i686 speeds this up quite a bit on my machine (even more so
dnl # than -march=athlon-xp) so if this looks like a recent x86 machine,
dnl # stick that in CFLAGS
dnl # CFLAGS += $(shell if grep mmx /proc/cpuinfo > /dev/null; then echo -march=i686; fi)
dnl ################################################################
dnl # Output the Makefiles
dnl ################################################################
AC_CONFIG_FILES([
Makefile
autopackage/default.apspec
data/Makefile
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/22x22/Makefile
data/icons/24x24/Makefile
data/icons/scalable/Makefile
src/Makefile
contrib/Makefile
])
AC_OUTPUT
echo
echo $PACKAGE v$VERSION
echo
if test "x$have_exr" != "xyes"; then
echo "Not including support for OpenEXR files"
else
echo "Including support for OpenEXR files"
fi
if test "x$have_gnet" != "xyes"; then
echo "Not including clustering or remote control support"
else
echo "Including clustering or remote control support"
fi
echo
echo "Now type make to compile"
echo "Then su to root and type: make install"
echo