summaryrefslogtreecommitdiff
path: root/configure.in
blob: 967552a40d39e63b8acea329d14b39d7ee8aefe7 (plain)
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
# get rid of that stupid cache mechanism
rm -f config.cache

AC_INIT(elementary, 0.1.0.0, enlightenment-devel@lists.sourceforge.net)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.in)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST

AM_INIT_AUTOMAKE(1.6 dist-bzip2)
AM_CONFIG_HEADER(elementary_config.h)

AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_C_BIGENDIAN
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST

AC_LIBTOOL_WIN32_DLL
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
AC_PROG_LIBTOOL

VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
AC_SUBST(version_info)

PKG_PROG_PKG_CONFIG

lt_enable_auto_import=""
ELM_UNIX_DEF="#undef"
ELM_WIN32_DEF="#undef"
ELM_WINCE_DEF="#undef"
case "$host_os" in
   mingw32* | cegcc*)
      PKG_CHECK_MODULES([EVIL], [evil])
      AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed.])
      dnl needed for correct definition of EAPI
      AC_DEFINE(ELEMENTARY_BUILD, 1, [Define to mention that evas is built])
      lt_enable_auto_import="-Wl,--enable-auto-import"
      ELM_WINCE_DEF="#define"
      ;;
   mingw*)
      PKG_CHECK_MODULES([EVIL], [evil])
      AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed.])
      dnl needed for correct definition of EAPI
      AC_DEFINE(ELEMENTARY_BUILD, 1, [Define to mention that evas is built])
      lt_enable_auto_import="-Wl,--enable-auto-import"
      ELM_WIN32_DEF="#define"
      ;;
   *)
      ELM_UNIX_DEF="#define"
      ;;
esac
AC_SUBST(lt_enable_auto_import)
AC_SUBST(ELM_UNIX_DEF)
AC_SUBST(ELM_WIN32_DEF)
AC_SUBST(ELM_WINCE_DEF)

PKG_CHECK_MODULES([ELEMENTARY],
   [
    eina-0
    eet
    evas
    ecore
    ecore-evas
    ecore-job
    ecore-txt
    ecore-file
    edje
   ]
)

have_elementary_x="no"
PKG_CHECK_MODULES([ELEMENTARY_X],
   [ecore-x],
   [
    AC_DEFINE(HAVE_ELEMENTARY_X, 1, [X11 support for Elementary])
    have_elementary_x="yes"
   ],
   [have_elementary_x="no"]
)

have_elementary_fb="no"
PKG_CHECK_MODULES([ELEMENTARY_FB],
   [ecore-fb],
   [
    AC_DEFINE(HAVE_ELEMENTARY_FB, 1, [FB support for Elementary])
    have_elementary_fb="yes"
   ],
   [have_elementary_fb="no"]
)

have_elementary_wince="no"
PKG_CHECK_MODULES([ELEMENTARY_WINCE],
   [ecore-wince],
   [
    AC_DEFINE(HAVE_ELEMENTARY_WINCE, 1, [Windows CE support for Elementary])
    have_elementary_wince="yes"
   ],
   [have_elementary_wince="no"]
)

my_libs="-lm"
AC_SUBST(my_libs)

AC_OUTPUT([
Makefile
elementary.pc
src/Makefile
src/lib/Makefile
src/lib/Elementary.h
src/bin/Makefile
data/Makefile
data/themes/Makefile
data/images/Makefile
data/objects/Makefile
data/desktop/Makefile
])

#####################################################################
## Info

echo
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo "Configuration Options Summary:"
echo
echo "Engines:"
echo "  X11...........: ${have_elementary_x}"
echo "  Framebuffer...: ${have_elementary_fb}"
echo "  Windows CE....: ${have_elementary_wince}"
echo
echo "------------------------------------------------------------------------"
echo
echo "Now type 'make' ('gmake' on some systems) to compile $PACKAGE,"
echo "and then afterwards as root (or the user who will install this), type"
echo "'make install'. Change users with 'su' or 'sudo' appropriately."
echo