File: configure.in

package info (click to toggle)
linux-atm 2.4.0-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,892 kB
  • ctags: 6,138
  • sloc: ansic: 40,265; sh: 8,968; yacc: 1,181; lex: 555; makefile: 433; perl: 162
file content (179 lines) | stat: -rw-r--r-- 4,454 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
dnl configure.in - the Autoconf input file
dnl
dnl Paul B Schroeder <paulsch@us.ibm.com>
dnl
dnl 2001-08-29:  Initial configure.in for atm tools starting with version 2.4.0
dnl

AC_INIT(src/include/atm.h)
AM_CONFIG_HEADER(config.h)

dnl Find operating system, vendor, architecture
AC_CANONICAL_SYSTEM

AM_INIT_AUTOMAKE(linux-atm,2.4.0)

LIBVER_CURRENT="1"
LIBVER_REVISION="0"
LIBVER_AGE="0"
AC_SUBST(LIBVER_CURRENT)
AC_SUBST(LIBVER_REVISION)
AC_SUBST(LIBVER_AGE)

dnl Find programs needed for building and installation.
AC_PROG_CC
AM_PROG_LEX
AC_PROG_YACC
AC_PROG_INSTALL

dnl libtool defs
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)

dnl We have some special PERL scripts which are used during the build process
AC_PATH_PROG(PERL, perl)
AC_SUBST(PERL)


dnl Check for needed header files
AC_CHECK_HEADER(asm/errno.h, ,
	AC_MSG_ERROR([*** Unable to find asm/errno.h!!!])
)

AC_CHECK_HEADER(linux/atmsap.h, ,
	AC_MSG_ERROR([*** Unable to find linux/atmsap.h!!!])
)

dnl Check for libraries
dnl libresolv is required
AC_CHECK_LIB(resolv, main, ,
	AC_MSG_ERROR([*** Unable to find libresolv!!!])
)

dnl We don't want libresolv everywhere, just with libatm
LIBS=""

INCLUDES="-I\$(top_srcdir)/src/include"
CFLAGS="$INCLUDES $CFLAGS -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes"
dnl Add -d flag to bison/yacc to create intermediate .h files
YACC="$YACC -d"

dnl For yacc compiles...
AC_DEFINE(YY_USE_CONST)

dnl Config files
atmsigd_conf_dir=`	test "x$exec_prefix" = xNONE && exec_prefix=$ac_default_prefix
			test "x$prefix" = xNONE && prefix=${exec_prefix}
			eval echo "$sysconfdir"`
AC_DEFINE_UNQUOTED(ATMSIGD_CONF,"$atmsigd_conf_dir/atmsigd.conf")

dnl Do our ./configure arguments here
AC_ARG_WITH(uni,
	[  --with-uni=VERSION      UNI version to use (3.0,3.1,4.0) [default=dynamic]],
	[
	case "$with_uni" in
	"3.0" ) AC_DEFINE(UNI30)
	;;
	"3.1" ) AC_DEFINE(UNI31)
	;;
	"4.0" ) AC_DEFINE(UNI40)
	;;
	*)
		AC_DEFINE(DYNAMIC_UNI)
		AC_MSG_WARN([*** UNI version not specified correctly.  Defaulting to dynamic UNI.])
	esac
	],
	AC_DEFINE(DYNAMIC_UNI)
)

AC_ARG_ENABLE(allow_uni30,
	[  --enable-allow_uni30    Allow UNI 3.0 backwards-compatible extensions (if using UNI 3.1)],
	[
	if test "$with_uni" = "3.1" ; then
		AC_DEFINE(ALLOW_UNI30)
	else
		AC_MSG_WARN([*** Allow UNI 3.0 was not enabled.  It is only valid when UNI 3.1 is specified as the default via --with-uni.])
	fi
	]
)

AC_ARG_ENABLE(q2963_1,
	[  --enable-q2963_1        Enable peak cell rate modification as specified in Q.2963.1 (if using UNI 4.0)],
	[
	if test "$with_uni" = "4.0" ; then
		AC_DEFINE(Q2963_1)
	else
		AC_MSG_WARN([*** Q.2963.1 was not enabled.  It is only valid when UNI 4.0 is specified as the default via --with-uni.])
	fi
	]
)

AC_ARG_ENABLE(cisco,
	[  --enable-cisco          Enable work around for point-to-multipoint signaling bug in Cisco LS100 or LS7010 switches],
	AC_DEFINE(CISCO)
)

AC_ARG_ENABLE(thomflex,
	[  --enable-thomflex       Some versions of the Thomson Thomflex 5000 won't do any signaling before they get a RESTART.  Enable sending of a RESTART whenever SAAL comes up.],
	AC_DEFINE(THOMFLEX)
)

dnl Use select() instead of poll() with MPOA
dnl Do we still need this??  Make it selectable??
AC_DEFINE(BROKEN_POLL)

AC_ARG_ENABLE(mpoa_1_1,
	[  --enable-mpoa_1_1       Enable proposed MPOA 1.1 features],
	AC_DEFINE(MPOA_1_1)
)

AC_ARG_ENABLE(mpr,
	[  --enable-mpr            Enable memory debugging (if MPR is installed)],
	[
	case "$enable_mpr" in
	"" | y | ye | yes | Y | YE | YES )
		AC_CHECK_LIB(mpr, main, ,
			[
			AC_MSG_WARN([*** Could not find libmpr!  Is MPR installed?])
			]
		)
	;;
	esac
	]
)

dnl Xsed="sed -e s/^X//"
dnl LTLIBOBJS=`echo X"$LIBOBJS" | \$Xsed -e "s,\. [^.]* ,.lo,g;s,\.[^.]*$,.lo,"`
dnl AC_SUBST(LTLIBOBJS)

dnl Output all of our Makefiles
AC_OUTPUT(	Makefile \
		doc/Makefile \
		m4/Makefile \
		src/Makefile \
		src/include/Makefile \
		src/lib/Makefile \
		src/test/Makefile \
		src/debug/Makefile \
		src/qgen/Makefile \
		src/saal/Makefile \
		src/sigd/Makefile \
		src/maint/Makefile \
		src/arpd/Makefile \
		src/ilmid/Makefile \
		src/ilmid/asn1/Makefile \
		src/man/Makefile \
		src/led/Makefile \
		src/lane/Makefile \
		src/mpoad/Makefile \
		src/switch/Makefile \
		src/switch/debug/Makefile \
		src/switch/tcp/Makefile \
		src/config/Makefile \
		src/config/init-redhat/Makefile \
		src/extra/Makefile \
		src/extra/linux-atm.spec \
		src/extra/ANS/Makefile \
		src/extra/drivers/Makefile
		)