File: configure.in

package info (click to toggle)
aatv 0.3-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 272 kB
  • ctags: 49
  • sloc: ansic: 570; sh: 330; makefile: 20
file content (159 lines) | stat: -rw-r--r-- 5,383 bytes parent folder | download | duplicates (3)
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
dnl ---------------------------------------------------------------------------
dnl aatv - a program to watch TV on a text-based console
dnl Copyright (C) 2000 Florent de Lamotte
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
dnl ---------------------------------------------------------------------------

AC_INIT(src/aatv.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(aatv, 0.3)


dnl ---------------------------------------------------------------------------
dnl Checks for programs.
dnl ---------------------------------------------------------------------------

AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET


dnl ---------------------------------------------------------------------------
dnl System checks.
dnl ---------------------------------------------------------------------------

AC_AIX
AC_ISC_POSIX
AC_MINIX


dnl ---------------------------------------------------------------------------
dnl Checks for libraries.
dnl ---------------------------------------------------------------------------

AC_CHECK_LIB([aa], [aa_parseoptions], ,
             [AC_MSG_ERROR(Cannot find aalib! Aborting.)])


dnl ---------------------------------------------------------------------------
dnl Checks for header files.
dnl ---------------------------------------------------------------------------

AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS(stdio.h stdlib.h string.h strings.h memory.h unistd.h errno.h)
AC_CHECK_HEADERS(fcntl.h time.h sys/time.h sys/mman.h sys/ioctl.h)
AC_CHECK_HEADERS(sys/soundcard.h aalib.h asm/types.h linux/videodev.h)


dnl ---------------------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
dnl ---------------------------------------------------------------------------

AC_C_CONST
AC_TYPE_SIZE_T


dnl ---------------------------------------------------------------------------
dnl Checks for library functions.
dnl ---------------------------------------------------------------------------

AC_CHECK_FUNCS(strtok strcasecmp atol)


dnl ---------------------------------------------------------------------------
dnl Handle user-specified --enable-FEATURE options.
dnl ---------------------------------------------------------------------------

AC_ARG_ENABLE(debug,
		[  --enable-debug          turn on debugging [[default=off]]],
		,
		enable_debug=no)
 
if test "x$enable_debug" = "xyes"; then
 if test "x$GCC" = "xyes"; then
  CFLAGS="$CFLAGS \
-Wall -g -O2 -pedantic -ansi -W -Wtraditional -Wshadow -Wpointer-arith \
-Wcast-qual -Wcast-align -Wwrite-strings -Wconversion \
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -Winline \
-D__USE_BSD -D__USE_XOPEN_EXTENDED -D__USE_POSIX"
 fi
else
 CFLAGS="$CFLAGS -Wall -O2"
fi


dnl ---------------------------------------------------------------------------
dnl Handle user-specified --with-PACKAGE options.
dnl ---------------------------------------------------------------------------

AC_ARG_WITH(configfile,
            [  --with-configfile=FILE  The location of the configfile.])


dnl ---------------------------------------------------------------------------
dnl Expand directories.
dnl ---------------------------------------------------------------------------

dnl EXPAND_DIR(VARNAME, DIR)
dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR,
dnl and assigns the resulting string to VARNAME
dnl example: EXPAND_DIR(LOCALEDIR, "$datadir/locale")
dnl eg, then: AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
dnl by Alexandre Oliva
dnl from http://www.cygnus.com/ml/automake/1998-Aug/0040.html
AC_DEFUN(EXPAND_DIR, [
 $1=$2
 $1=`(
  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
  test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
  eval echo \""[$]$1"\"
 )`
])


if test "x$with_configfile" != "x"; then
 EXPAND_DIR(AATV_CONFIGFILE, "$with_configfile")
else
 EXPAND_DIR(AATV_CONFIGFILE, "$sysconfdir/$PACKAGE.conf")
fi


dnl ---------------------------------------------------------------------------
dnl Unquoted defines.
dnl ---------------------------------------------------------------------------

AC_DEFINE_UNQUOTED(AATV_CONFIGFILE, "$AATV_CONFIGFILE",
                   [The aatv configfile.])


dnl ---------------------------------------------------------------------------
dnl Substituted variables.
dnl ---------------------------------------------------------------------------

AC_SUBST(AATV_CONFIGFILE)


dnl ---------------------------------------------------------------------------
dnl Output files.
dnl ---------------------------------------------------------------------------

AC_OUTPUT([
Makefile
src/Makefile
])