59 |
FEATURES="$FEATURES -D_PROFILING_" |
FEATURES="$FEATURES -D_PROFILING_" |
60 |
fi]) |
fi]) |
61 |
|
|
62 |
|
dnl GNU Profiling options |
63 |
|
AC_ARG_ENABLE(gnuprofile, |
64 |
|
AC_HELP_STRING([--enable-gnuprofile], |
65 |
|
[Enable profiling informations for gprof]), |
66 |
|
[if test "$enable_gnuprofile" = "yes" ; then |
67 |
|
GNU_PROF_CFLAGS="-pg -fprofile-arcs -ftest-coverage" |
68 |
|
GNU_PROF_LDFLAGS="-pg" |
69 |
|
fi]) |
70 |
|
|
71 |
dnl Assembly code |
dnl Assembly code |
72 |
AC_ARG_ENABLE(assembly, |
AC_ARG_ENABLE(assembly, |
73 |
AC_HELP_STRING([--disable-assembly], |
AC_HELP_STRING([--disable-assembly], |
91 |
DIVX4_DECORE="decore;" |
DIVX4_DECORE="decore;" |
92 |
fi]) |
fi]) |
93 |
|
|
|
|
|
94 |
dnl ========================================================================== |
dnl ========================================================================== |
95 |
dnl Default install prefix and checks build type |
dnl Default install prefix and checks build type |
96 |
dnl ========================================================================== |
dnl ========================================================================== |
253 |
;; |
;; |
254 |
esac |
esac |
255 |
|
|
256 |
|
dnl ========================================================================== |
257 |
|
dnl |
258 |
|
dnl Determines best options for CC and LD |
259 |
|
dnl - STATIC_LIB, SHARED_LIB, SPECIFIC_CFLAGS, SPECIFIC_LDLAGS |
260 |
|
dnl |
261 |
|
dnl ========================================================================== |
262 |
|
|
263 |
AC_MSG_CHECKING(for platform specific LDFLAGS/CFLAGS) |
AC_MSG_CHECKING(for platform specific LDFLAGS/CFLAGS) |
264 |
SPECIFIC_LDFLAGS="" |
SPECIFIC_LDFLAGS="" |
265 |
SPECIFIC_CFLAGS="" |
SPECIFIC_CFLAGS="" |
266 |
case "$target_os" in |
case "$target_os" in |
267 |
*bsd*|linux*|irix*|solaris*) |
*bsd*|linux*|irix*|solaris*) |
268 |
AC_MSG_RESULT([-Wl,-soname,libxvidcore.so -shared -lc -lm]) |
AC_MSG_RESULT([ok]) |
269 |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
270 |
SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\$(API_MINOR)" |
SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\$(API_MINOR)" |
271 |
SPECIFIC_LDFLAGS="-Wl,-soname,libxvidcore.\$(SHARED_EXTENSION) -shared -lc -lm" |
SPECIFIC_LDFLAGS="-Wl,-soname,libxvidcore.\$(SHARED_EXTENSION) -shared -lc -lm" |
272 |
SPECIFIC_CFLAGS="-fPIC" |
SPECIFIC_CFLAGS="-fPIC" |
273 |
;; |
;; |
274 |
[[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]|mingw32|mks) |
[[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]|mingw32|mks) |
275 |
AC_MSG_RESULT([-shared -Wl,--dll,--out-implib,\$@.a]) |
AC_MSG_RESULT([ok]) |
276 |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
277 |
SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)" |
SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)" |
278 |
SPECIFIC_LDFLAGS="-mno-cygwin -shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def" |
SPECIFIC_LDFLAGS="-mno-cygwin -shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def" |
279 |
SPECIFIC_CFLAGS="-mno-cygwin" |
SPECIFIC_CFLAGS="-mno-cygwin" |
280 |
;; |
;; |
281 |
darwin*|raphsody*) |
darwin*|raphsody*) |
282 |
AC_MSG_RESULT([-dynamiclib -flat_namespace]) |
AC_MSG_RESULT([ok]) |
283 |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
284 |
SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)" |
SHARED_LIB="libxvidcore.\$(API_MAJOR).\$(SHARED_EXTENSION)" |
285 |
SPECIFIC_LDFLAGS="-dynamiclib -flat_namespace" |
SPECIFIC_LDFLAGS="-dynamiclib -flat_namespace -compatibility_version \$(API_MAJOR) -current_version \$(API_MINOR) -install_name \$(libdir)/\$(SHARED_LIB)" |
286 |
SPECIFIC_CFLAGS="-fPIC -fno-common -no-cpp-precomp" |
SPECIFIC_CFLAGS="-fPIC -fno-common -no-cpp-precomp" |
287 |
;; |
;; |
288 |
beos) |
beos) |
289 |
|
AC_MSG_RESULT([ok]) |
290 |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
291 |
SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)" |
SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)" |
|
AC_MSG_RESULT([-nostart]) |
|
292 |
SPECIFIC_LDFLAGS="-nostart" |
SPECIFIC_LDFLAGS="-nostart" |
293 |
SPECIFIC_CFLAGS="-fPIC" |
SPECIFIC_CFLAGS="-fPIC" |
294 |
;; |
;; |
295 |
*) |
*) |
296 |
AC_MSG_RESULT([Unknown OS - -shared -lc -lm]) |
AC_MSG_RESULT([Unknown Platform (Using default -shared -lc -lm)]) |
297 |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" |
298 |
SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)" |
SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)" |
299 |
SPECIFIC_LDFLAGS="" |
SPECIFIC_LDFLAGS="" |
303 |
|
|
304 |
dnl ========================================================================== |
dnl ========================================================================== |
305 |
dnl |
dnl |
306 |
dnl Assembler stuff - AS, AFLAGS, ASSEMBLY_EXTENSION, SOURCES |
dnl Assembler stuff |
307 |
|
dnl - AS, AFLAGS, ASSEMBLY_EXTENSION, SOURCES |
308 |
dnl |
dnl |
309 |
dnl ========================================================================== |
dnl ========================================================================== |
310 |
|
|
442 |
|
|
443 |
dnl ========================================================================== |
dnl ========================================================================== |
444 |
dnl |
dnl |
445 |
|
dnl Profiling stuff goes here |
446 |
|
dnl - adds options to SPECIFIC_CFLAGS, SPECIFIC_LDLAGS |
447 |
|
dnl - removes incompatible options from CFLAGS |
448 |
|
dnl |
449 |
|
dnl ========================================================================== |
450 |
|
|
451 |
|
SPECIFIC_LDFLAGS="$SPECIFIC_LDFLAGS $GNU_PROF_LDFLAGS" |
452 |
|
SPECIFIC_CFLAGS="$SPECIFIC_CFLAG $GNU_PROF_CFLAGS" |
453 |
|
|
454 |
|
if test "$enable_gnuprofile" = "yes" ; then |
455 |
|
CFLAGS=`echo $CFLAGS | sed s/'-fomit-frame-pointer'/''/` |
456 |
|
fi |
457 |
|
|
458 |
|
dnl ========================================================================== |
459 |
|
dnl |
460 |
dnl Substitions |
dnl Substitions |
461 |
dnl |
dnl |
462 |
dnl ========================================================================== |
dnl ========================================================================== |