File: configure.in

package info (click to toggle)
camserv 0.42-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,884 kB
  • ctags: 1,123
  • sloc: ansic: 19,694; sh: 7,454; makefile: 206
file content (139 lines) | stat: -rw-r--r-- 3,714 bytes parent folder | download
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
## Process this file with automake to produce Makefile.in
dnl Process this file with autoconf to produce a configure script.
AC_INIT(camserv/camserv.c)
AM_INIT_AUTOMAKE(camserv, 0.42)
AM_CONFIG_HEADER(include/config.h:config.in)

AM_ACLOCAL_INCLUDE(macros)

AC_PROG_CC
AC_LIBLTDL_CONVENIENCE
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_SUBST(LIBLTDL)
CPPFLAGS="$CPPFLAGS $INCLTDL -I/usr/local/include"
LIBS="$LIBS -L/usr/local/lib"

AC_CONFIG_SUBDIRS(libltdl)

AC_CHECK_LIB(m,sqrt)

AC_CHECK_LIB(jpeg,jpeg_start_compress)
AC_CHECK_LIB(socket,socket)
AC_CHECK_LIB(nsl,inet_ntoa)
AC_CHECK_LIB(ttf,TT_Read_File,
[have_libttf=yes
LIBS="$LIBS -lttf"
],[have_ttf=no])

AC_CHECK_LIB(Imlib2,imlib_context_set_image,
[have_imlib2=yes
LIBS="$LIBS -lImlib2"
],[have_imlib2=no])
AM_CONDITIONAL(HAVE_IMLIB2, test $have_imlib2 = yes)
if test $have_imlib2 = no ; then
	echo 
	echo "Imlib2 is either not installed on this system, or is too old"
        echo "You will not be able to use the Imlib2 filter.  To obtain the"
	echo "newest version, visit: http://www.rasterman.com/imlib.html"
	echo
fi

AC_PATH_PROG(gnomeconfig, gnome-config)
AC_MSG_CHECKING(for gdk_pixbuf)
GDK_PIXBUF_CFLAGS=`$gnomeconfig gdk_pixbuf --cflags`
GDK_PIXBUF_LDFLAGS=`$gnomeconfig gdk_pixbuf --libs`
AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "_$GDK_PIXBUF_CFLAGS" != _)
if test "_$GDK_PIXBUF_CFLAGS" = _ ; then
	AC_MSG_RESULT([not found!])
	echo 
	echo "gdk_pixbuf is not installed on this system.  You will be unable "
	echo "to use the GDK Pixbuf filter"
	echo
else
	AC_MSG_RESULT(ok)
	LIBS="$LIBS $GDK_PIXBUF_LDFLAGS $GNOME_LIBS"
	CPPFLAGS="$CPPFLAGS $GDK_PIXBUF_CFLAGS"
fi



AC_JPEG_VALID
AM_CONDITIONAL(JPEG_VALID, test $av_jpeg_valid = yes)

AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h Imlib2.h)
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME

AC_PROG_GCC_TRADITIONAL
AC_FUNC_MMAP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(select socket strdup strerror)

AC_PATH_XTRA

dnl Check to see if we have any valid methods for video
AC_CHECK_HEADERS(linux/videodev.h,
[video_v4l=yes],[video_v4l=no])
AM_CONDITIONAL(VIDEO_V4L, test $video_v4l = yes)

AC_CHECK_HEADERS(machine/ioctl_bt848.h,
[video_fbsd_bttv=yes],[video_fbsd_bttv=no])
AM_CONDITIONAL(VIDEO_FBSD_BTTV, test $video_fbsd_bttv = yes)

if test $av_jpeg_valid = yes ; then
	valid_video_inputs="video_basic"
else
	echo 
	echo "A valid JPEG library was not found.  Most stuff will not work."
	echo
	valid_video_inputs=""
fi

if test $video_fbsd_bttv = yes ; then
    if test $av_jpeg_valid = no ; then
	echo 
	echo "FreeBSD bttv header was detected, but your JPEG library is "
	echo "too old.  Please upgrade to at least libjpeg version 6b"
	echo "Neither the video library, nor the jpeg filter will be built"
	echo
    else
	valid_video_inputs="$valid_video_inputs fbsd_bttv"
    fi
fi

if test $video_v4l = yes ; then
    if test $av_jpeg_valid = no ; then
	echo
        echo "Video4Linux was detected, but your JPEG library is too old"
	echo "Please upgrade to at least libjpeg version 6b"
	echo "Neither the video library, nor the jpeg filter will be built"
	echo
    else
	valid_video_inputs="$valid_video_inputs v4l"
    fi	
fi

if test "_$valid_video_inputs" = _ ; then
    echo
    echo "ALERT:  No valid video devices were found to compile for."
    echo "The camerv binary will NOT be compiled, however the relay "
    echo "binary will be built."
    echo
else
    echo
    echo "Building for video modules: $valid_video_inputs"
    echo
fi

AM_CONDITIONAL(VALID_VIDEO, test "$valid_video_inputs" != "" )

if test "$CC" = "gcc" ; then
	CPPFLAGS="$CPPFLAGS -Wall"
fi	

AC_OUTPUT(macros/Makefile common/Makefile camserv/Makefile include/Makefile \
	relay/Makefile	camcmd/Makefile Makefile)