summaryrefslogtreecommitdiff
path: root/recordmydesktop/configure.ac
blob: ef7da9819891fd135378fd908f4d5637ba7369aa (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
150
151
152
153
154
155
 #                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(src/recordmydesktop.c)
AM_INIT_AUTOMAKE(recordmydesktop,0.3.5.1,)

AC_CONFIG_SRCDIR([src/recordmydesktop.c])
AM_CONFIG_HEADER(config.h)



# Checks for programs.

AC_PROG_CC

AC_CANONICAL_HOST

# Checks for header files.

AC_HEADER_DIRENT
AC_HEADER_STDC

AC_PATH_X
AC_PATH_XTRA

if test "x$x_libraries" != "x" && test "x$x_libraries" != xNONE ; then
    echo "X libraries are found in $x_libraries"
    LIBS="-L$x_libraries  $LIBS";
fi

if test "x$x_includes" != "x" && test "x$x_includes" != xNONE ; then
    echo "X includes are found in $x_includes"
    CFLAGS="-I$x_includes  $CFLAGS";
fi

AC_ARG_ENABLE(oss,
     [  --enable-oss[=yes]    compile with OSS(don't check for ALSA)],
     [case "${enableval}" in
       yes) oss=true ;;
       no)  oss=false ;;
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-oss) ;;
     esac],[oss=false])

AC_ARG_ENABLE(jack,
     [  --enable-jack[=yes]    compile with Jack support],
     [case "${enableval}" in
       yes) jack=true ;;
       no)  jack=false ;;
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-jack) ;;
     esac],[jack=true])

AC_CHECK_HEADER([alsa/asoundlib.h])
AC_CHECK_HEADER([endian.h],default_endian=true)
if test x$default_endian != xtrue; then
AC_CHECK_HEADER([machine/endian.h],
                AC_DEFINE([HAVE_MACHINE_ENDIAN_H],1,
                            endian.h in $include_path/machine/ subdirectory))
fi

AC_CHECK_HEADER([sys/soundcard.h])
AC_CHECK_HEADER([dlfcn.h],[dlfcn_header=true])

if test x$jack = xtrue && test x$dlfcn_header = xtrue; then
AC_CHECK_HEADER([jack/jack.h],
                jack_headers_present=true)
fi
AC_CHECK_HEADERS([sys/time.h unistd.h vorbis/vorbisfile.h fcntl.h])



AC_CHECK_TYPES([u_int16_t],,AC_MSG_ERROR([Type u_int16_t must be available!]))
AC_CHECK_TYPES([u_int32_t],,AC_MSG_ERROR([Type u_int32_t must be available!]))
AC_CHECK_TYPES([u_int64_t],,)

# Checks for libraries.

AC_CHECK_LIB([m],[isnan],,)
AC_CHECK_LIB([z],[deflate],,AC_MSG_ERROR([Can't find zlib]))
AC_CHECK_LIB([ICE],[IceOpenConnection],,AC_MSG_ERROR([Can't find libICE]),)
AC_CHECK_LIB([SM],[SmcOpenConnection],,AC_MSG_ERROR([Can't find libSM]),)
AC_CHECK_LIB([X11],[XOpenDisplay],,AC_MSG_ERROR([Can't find libX11]),
            -L$x_libraries $X_PRE_LIBS)
AC_CHECK_LIB([Xext],[XShmQueryVersion],,AC_MSG_ERROR([Can't find libXext]))
AC_CHECK_LIB([Xfixes], [XFixesQueryExtension],,
             AC_MSG_ERROR([Can't find libXfixes]))
AC_CHECK_LIB([Xdamage], [XDamageQueryExtension],,
             AC_MSG_ERROR([Can't find libXdamage]))
AC_CHECK_LIB([vorbis],[vorbis_info_clear],,
             AC_MSG_ERROR([Can't find libvorbis]))
AC_CHECK_LIB([vorbisfile],[ov_open],,
             AC_MSG_ERROR([Can't find libvorbisfile]),-lvorbis)
AC_CHECK_LIB([vorbisenc],[vorbis_encode_init],,
             AC_MSG_ERROR([Can't find libvorbisenc]),-lvorbis)
AC_CHECK_LIB([ogg],[ogg_stream_init],,AC_MSG_ERROR([Can't find libogg]))
AC_CHECK_LIB([theora],[theora_encode_YUVin],,
             AC_MSG_ERROR([Can't find libtheora]))
AC_CHECK_LIB([pthread],[pthread_mutex_lock],,
             AC_MSG_ERROR([Can't find libpthread]))

if test x$oss = xfalse; then
    AC_CHECK_LIB([asound],[snd_pcm_drain],,
                audio_backend="OSS")
else
    audio_backend="OSS"
fi

if test x$jack_headers_present = xtrue; then
    case "$host_os" in
    *bsd*)
            AC_CHECK_LIB([c], [dlopen],,libdl_np=true)
    ;;
    *)
            AC_CHECK_LIB([dl],[dlopen],,libdl_np=true)
    ;;
    esac

    if test x$libdl_np != xtrue; then
        AC_DEFINE([HAVE_JACK_H],1,
                define to 1 if <jack/jack.h> exists)
    fi
fi


# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_MALLOC

AC_CONFIG_FILES([Makefile
        src/Makefile
        include/Makefile
        doc/Makefile ])
AC_OUTPUT

if test x$audio_backend != xOSS; then
    audio_backend="ALSA"
fi
if test x$jack_headers_present = xtrue && test x$libdl_np != xtrue; then
    jack_support="Enabled"
else
    jack_support="Disabled"
fi
echo ""
echo ""
echo "****************************************"
echo ""
echo "Audio driver that will be used: $audio_backend"
echo ""
echo "Compile with Jack support: $jack_support"
echo ""
echo "****************************************"
echo ""
echo ""
© All Rights Reserved