summaryrefslogtreecommitdiff
path: root/legacy/emotion/configure.in
blob: a9c1eb599bccbf7a9948752124de2cd3303aacdd (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
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
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(emotion, 0.0.1.004)
AM_CONFIG_HEADER(config.h)

AC_C_BIGENDIAN
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}" = 'x${exec_prefix}/bin'; then
  if test "x${exec_prefix}" = "xNONE"; then
    if test "x${prefix}" = "xNONE"; then
      bindir="${ac_default_prefix}/bin";
    else
      bindir="${prefix}/bin";
    fi
  else
    if test "x${prefix}" = "xNONE"; then
      bindir="${ac_default_prefix}/bin";
    else
      bindir="${prefix}/bin";
    fi
  fi
fi

if test "x${libdir}" = 'x${exec_prefix}/lib'; then
  if test "x${exec_prefix}" = "xNONE"; then
    if test "x${prefix}" = "xNONE"; then
      libdir="${ac_default_prefix}/lib";
    else
      libdir="${prefix}/lib";
    fi
  else
    if test "x${prefix}" = "xNONE"; then
      libdir="${ac_default_prefix}/lib";
    else
      libdir="${prefix}/lib";
    fi
  fi
fi

dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
  if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [Package Data Directory])
  else
    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", [Package Data Directory])
  fi
else
  AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", [Package Data Directory])
fi
	  
dnl Set PACKAGE_BIN_DIR in config.h.
if test "x${bindir}" = 'xNONE'; then
  if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", [Install Location for Executables])
  else
    AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", [Install Location for Executables])
  fi
else
  AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", [Install Location for Executables])
fi

dnl Set PACKAGE_LIB_DIR in config.h.
if test "x${libdir}" = 'xNONE'; then
  if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", [Install Location for Libraries])
  else
    AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", [Install Location for Libraries])
  fi
else
  AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", [Install Location for Libraries])
fi

dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source Directory])

function vser
{
  v=$1
  VSTART=`echo $v | awk -F_ '{printf("%s", $1);}'`
  V1=`echo $VSTART | awk -F\. '{printf("%s", $1);}'`
  V2=`echo $VSTART | awk -F\. '{printf("%s", $2);}'`
  V3=`echo $VSTART | awk -F\. '{printf("%s", $3);}'`
  V4="0"
  VEND=`echo $v | awk -F_ '{printf("%s", $2);}'`
  if test -n "$VEND"; then
    V4=`echo $VEND | sed s/pre//`
  fi
  V3=$(( $V3 * 100  ));
  V2=$(( $V2 * 10000  ));
  V1=$(( $V1 * 1000000  ));
  V=$(( $V4 + $V3 + $V2 + $V1 ));
  echo $V
}

AC_PATH_GENERIC(eet, 0.9.10,
  [ ],
  [ AC_MSG_ERROR(Eet isn't installed)]
)

AC_PATH_GENERIC(evas, 0.9.9,
  [ ],
  [ AC_MSG_ERROR(Evas isn't installed)]
)

AC_PATH_GENERIC(edje, 0.5.0,
  [ ],
  [ AC_MSG_ERROR(Edje isn't installed)]
)

AC_PATH_GENERIC(ecore, 0.9.9,
  [ ],
  [ AC_MSG_ERROR(Ecore isn't installed)]
)
AC_CHECK_HEADERS(Ecore_X.h Ecore_Fb.h)

AC_PATH_GENERIC(embryo, 0.9.1,
  [ ],
  [ AC_MSG_ERROR(Embryo isn't installed)]
)

requirements="eet evas edje ecore embryo"

AC_ARG_ENABLE(xine,
	AC_HELP_STRING([--disable-xine],[disable xine support @<:@default=auto@:>@]),
	[enable_xine=$enableval],[enable_xine=auto])
HAVE_XINE="no"
if test "$enable_xine" != "no" ; then
	AC_PATH_GENERIC(xine, 1.1.1, [HAVE_XINE="yes"])

	if test "$HAVE_XINE" = "yes" ; then
		requirements="$requirements libxine"
		xine_plugins=`$XINE_CONFIG --plugindir`
		AC_SUBST(xine_plugins)
	fi
fi
if test "$enable_xine$HAVE_XINE" = "yesno" ; then
	AC_MSG_ERROR(xine not found)
fi

AC_ARG_ENABLE(gstreamer,
	AC_HELP_STRING([--disable-gstreamer],[disable gstreamer support @<:@default=auto@:>@]),
	[enable_gstreamer=$enableval],[enable_gstreamer=auto])
HAVE_GSTREAMER="no"
HAVE_GSTPLUG="no"
if test "$enable_gstreamer" != "no" ; then

	dnl Gstreamer version requirement
	GST_REQS=0.8.10
	GSTPLUG_REQS=0.8.10
	GST_MAJORMINOR=0.8

	PKG_CHECK_MODULES(GST, \
	   gstreamer-$GST_MAJORMINOR >= $GST_REQS,
	   HAVE_GSTREAMER="yes", HAVE_GSTREAMER="no")
	AC_MSG_RESULT($HAVE_GSTREAMER)

	PKG_CHECK_MODULES(GSTPLUG, \
	   gstreamer-plugins-$GST_MAJORMINOR >= $GSTPLUG_REQS,
	   HAVE_GSTPLUG="yes", HAVE_GSTPLUG="no")
	AC_MSG_RESULT($HAVE_GSTPLUG)
fi
if test "$enable_gstreamer$HAVE_GSTREAMER" = "yesno" ; then
	AC_MSG_ERROR(gstreamer not found)
fi
if test "$HAVE_GSTPLUG" = "no" ; then
	if test "$HAVE_GSTREAMER" = "no" ; then
		GSTPLUG_MSG="no"
	else
		AC_MSG_WARN([You should install gstreamer plugins and gst-ffmpeg to properly decode your video and audio files])
		GSTPLUG_MSG="no (you should install gst-plugins and gst-ffmpeg)"
	fi
else
	requirements="$requirements gstreamer"
	GSTPLUG_MSG="yes"
fi

if test "$HAVE_XINE$HAVE_GSTREAMER" = "nono" ; then
   AC_MSG_ERROR([Xine or Gstreamer must be installed to build emotion])
fi

AM_CONDITIONAL([BUILD_XINE_MODULE], [test "$HAVE_XINE" = yes])
AM_CONDITIONAL([BUILD_GSTREAMER_MODULE], [test "$HAVE_GSTREAMER" = yes])

AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
AC_SUBST(dlopen_libs)

AC_SUBST(requirements)

AC_OUTPUT([
Makefile
emotion.pc
emotion.spec
src/Makefile
src/lib/Makefile
src/modules/Makefile
src/bin/Makefile
data/Makefile
emotion-config
debian/changelog
],[
chmod +x emotion-config
])


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

echo
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo "Configuration Options Summary:"
echo
echo "  Modules:"
echo "    Xine...............: $HAVE_XINE"
echo "    Gstreamer..........: $HAVE_GSTREAMER"
echo "    Gstreamer plugins..: $GSTPLUG_MSG"
echo
echo "  Compilation..........: make"
echo
echo "  Installation.........: make install"
echo
echo "    prefix.........: $prefix"
echo "    binaries.......: $bindir"
echo "    libraries......: $libdir"
echo "    headers........: $includedir"
echo