summaryrefslogtreecommitdiff
path: root/configure.in
blob: 8004e697f5d57f5c117868c5178d857c83c68067 (plain) (blame)
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
dnl Process this file with autoconf to produce a configure script.

# get rid of that stupid cache mechanism
rm -f config.cache

AC_INIT(configure.in)
AM_INIT_AUTOMAKE(expedite, 0.6.0)
AM_CONFIG_HEADER(config.h)

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AM_ENABLE_SHARED
AM_PROG_LIBTOOL

if test "x${bindir}" = 'xNONE'; then
  if test "x${prefix}" = "xNONE"; then
    PACKAGE_BIN_DIR="${ac_default_prefix}/bin"
  else
    PACKAGE_BIN_DIR="${prefix}/bin"
  fi
else
  PACKAGE_BIN_DIR="${bindir}"
fi
AC_SUBST(PACKAGE_BIN_DIR)
		
if test "x${libdir}" = 'xNONE'; then
  if test "x${prefix}" = "xNONE"; then
    PACKAGE_LIB_DIR="${ac_default_prefix}/lib"
  else
    PACKAGE_LIB_DIR="${prefix}/lib"
  fi
else
  PACKAGE_LIB_DIR="${libdir}"
fi
AC_SUBST(PACKAGE_LIB_DIR)

if test "x${prefix}" = "xNONE"; then
  PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
else
  PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
fi
AC_SUBST(PACKAGE_DATA_DIR)

PKG_CHECK_MODULES([EVAS], evas)

PCFLAGS=$CFLAGS
CFLAGS="$EVAS_CFLAGS $CFLAGS"
AC_CHECK_HEADER(Evas_Engine_GL_X11.h,
  [ AC_DEFINE(HAVE_EVAS_GL, 1, [Evas GL Engine Support]) ],
  [ dummy=no ],
  [ #include <Evas.h> ]
)
AC_CHECK_HEADER(Evas_Engine_Software_X11.h,
  [ AC_DEFINE(HAVE_SOFTWARE_X11, 1, [Evas Software X11 Engine Support]) ],
  [ dummy=no ],
  [ #include <Evas.h> ]
)
AC_CHECK_HEADER(Evas_Engine_XRender_X11.h,
  [ AC_DEFINE(HAVE_XRENDER_X11, 1, [Evas XRender X11 Engine Support]) ],
  [ dummy=no ],
  [ #include <Evas.h> ]
)
CFLAGS=$PCFLAGS

AC_PATH_XTRA
x_dir=${x_dir:-/usr/X11R6}
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
AC_SUBST(x_cflags)
AC_SUBST(x_libs)

AC_OUTPUT([
Makefile
src/Makefile
src/bin/Makefile
data/Makefile
])