summaryrefslogtreecommitdiffstats
path: root/configure.in.in
blob: ece2cda60ffccadc0d744504be5e3f0d6c6f04f7 (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
#MIN_CONFIG(3.0.0)
KDE_ENABLE_HIDDEN_VISIBILITY
KDE_INIT_DOXYGEN([KDE Utils API Reference], [Version $VERSION])

AM_INIT_AUTOMAKE(k9copy, 1.2.4)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN

case "$target" in
    i?86-* | k?-*)
        AC_DEFINE([ARCH_X86],,[x86 architecture])
        AC_DEFINE([ARCH_386],,[386 architecture])
        ARCH_X86=yes
        ARCH_386=yes
        ARCH_X86_64=no
        ;;
    x86_64-*)
        AC_DEFINE([ARCH_X86_64],,[x86_64 architecture])
        ARCH_X86=no
        ARCH_386=no
        ARCH_X86_64=yes
        ;;
    *)
        ARCH_X86=no
        ARCH_386=no
        ARCH_X86_64=no
        ;;
esac

AC_MSG_CHECKING(for X86 architecture)
AC_MSG_RESULT($ARCH_X86)
AM_CONDITIONAL(ARCH_X86, [test "$ARCH_X86" = "yes"])

AC_MSG_CHECKING(for 386 architecture)
AC_MSG_RESULT($ARCH_386)
AM_CONDITIONAL(ARCH_386, [test "$ARCH_386" = "yes"])

AC_MSG_CHECKING(for X86_64 architecture)
AC_MSG_RESULT($ARCH_X86_64)
AM_CONDITIONAL(ARCH_X86_64, [test "$ARCH_X86_64" = "yes"])

have_gl=no
AC_CHECK_HEADER([GL/gl.h], \
[AC_DEFINE(HAVE_OPENGL, 1, [openGL support]) have_gl=yes], \
[AC_DEFINE(NO_OPENGL, 1, [No openGL support])])


AC_LANG_SAVE
AC_LANG_CPLUSPLUS
cxx_flags_safe="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS -I$tqt_includes"
AC_CHECK_HEADER([ffmpeg/avcodec.h], \
[AC_DEFINE(OLD_FFMPEG,1, [old ffmpeg])], \
  [AC_CHECK_HEADER([libavcodec/avcodec.h], \
   [AC_DEFINE(NEW_FFMPEG,1, [new ffmpeg])], \
   [AC_MSG_ERROR([libavcodec may be missing]) ])])
CXXFLAGS="$cxx_flags_safe"
AC_LANG_RESTORE

AC_LANG_SAVE
AC_LANG_CPLUSPLUS
cxx_flags_safe="$CXXFLAGS"
cflags_safe="$CFLAGS"
CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS -I$tqt_includes"
CFLAGS="$CFLAGS -D__STDC_CONSTANT_MACROS"
AC_MSG_CHECKING([if libavformat/avformat.h provides av_free_packet])
AC_TRY_LINK([#include <libavformat/avformat.h>
],[AVPacket *packet; av_free_packet(packet);],
AC_MSG_RESULT(yes),
[AC_MSG_RESULT(no)
AC_DEFINE(NEEDS_AV_FREE_PACKET,1,[no])])
CXXFLAGS="$cxx_flags_safe"
CFLAGS="$cflags_safe"
AC_LANG_RESTORE

have_swscale=no
AC_CHECK_HEADER([libswscale/swscale.h], \
[AC_DEFINE(HAVE_SWSCALE, 1, [swscale support]) have_swscale=yes], \
[AC_DEFINE(NO_SWSCALE, 1, [No swscale support])])