File: configure.in

package info (click to toggle)
baycomepp 0.10-15
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,896 kB
  • ctags: 3,195
  • sloc: ansic: 32,213; sh: 3,795; makefile: 482; sed: 93; perl: 31; asm: 18
file content (215 lines) | stat: -rw-r--r-- 6,075 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
dnl Process this file with autoconf to produce a configure script.

AC_INIT(acconfig.h)
AC_CANONICAL_SYSTEM

AM_INIT_AUTOMAKE(baycomepp, 0.10)
AM_CONFIG_HEADER(config.h)

dnl AC_CHECK_TOOL()

AC_PROG_MAKE_SET
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
dnl AC_PROG_RANLIB
AC_C_CONST
AC_C_INLINE
AC_HEADER_STDC

AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)
AC_CHECK_PROG(DLLTOOL, dlltool, dlltool, dlltool)
AC_CHECK_PROG(AS, as, as, as, as)
AC_CHECK_PROG(AR, ar, ar, ar, ar)
AC_CHECK_PROG(WINDRES, windres, windres, i686-pc-cygwin-windres)

AC_CYGWIN
AC_MINGW32
AC_EXEEXT
AC_OBJEXT

if test x$ac_cv_mingw32 != xyes; then
AC_CHECK_LIB(m,cos)
fi
AC_CHECK_HEADERS(pty.h getopt.h sys/io.h asm/io.h windows.h sched.h sys/perm.h syslog.h sys/socket.h)
AC_CHECK_HEADERS(net/if.h arpa/inet.h netinet/in.h linux/if.h linux/ax25.h linux/sockios.h linux/soundcard.h)
AC_CHECK_FUNCS(snprintf gettimeofday iopl random syslog vsyslog revoke)
AC_REPLACE_FUNCS(vsnprintf)
AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o")
xlibs=$LIBS
LIBS=
AC_CHECK_LIB(util,openpty)
AC_CHECK_FUNCS(openpty,DRVLIBOBJS="$DRVLIBOBJS $LIBS",DRVLIBOBJS="$DRVLIBOBJS openpty.o")
LIBS=$xlibs

AC_MSG_CHECKING(for GetSystemTime)
getsystemtime=no
AC_TRY_COMPILE([#include <windows.h>], 
     [ SYSTEMTIME tm; GetSystemTime(&tm); ],
     AC_DEFINE(HAVE_GETSYSTEMTIME) getsystemtime=yes)
AC_MSG_RESULT($getsystemtime)

dnl AC_CHECK_TYPE(int8_t,char)
dnl AC_CHECK_TYPE(u_int8_t,unsigned char)
dnl AC_CHECK_TYPE(int16_t,short)
dnl AC_CHECK_TYPE(u_int16_t,unsigned short)
dnl AC_CHECK_TYPE(int32_t,long)
dnl AC_CHECK_TYPE(u_int32_t,unsigned long)

AC_CHECK_TYPE(size_t,unsigned int)

AC_MSG_CHECKING(for bittypes)
bittypes=no
AC_TRY_COMPILE([#include <sys/types.h>], 
     [ int8_t a; u_int8_t b; int16_t c; u_int16_t d; int32_t e; u_int32_t f; ],
     AC_DEFINE(HAVE_BITTYPES) bittypes=yes)
AC_MSG_RESULT($bittypes)

AC_MSG_CHECKING(for IO functions such as inb, outb)
iofuncs=no
AC_TRY_COMPILE([#include <sys/io.h>], 
     [ inb(0); inw(0); inl(0); outb(0,0); outw(0,0); outl(0,0); ],
     AC_DEFINE(HAVE_IOFUNCS) iofuncs=yes,
     AC_TRY_COMPILE([#include <asm/io.h>], 
         [ inb(0); inw(0); inl(0); outb(0,0); outw(0,0); outl(0,0); ],
         AC_DEFINE(HAVE_IOFUNCS) iofuncs=yes))
AC_MSG_RESULT($iofuncs)

AC_MSG_CHECKING(for M_PI)
mpi=no
AC_TRY_COMPILE([#include <math.h>], 
     [ double f = M_PI; ],
     mpi=yes,AC_DEFINE(M_PI,3.14159265358979323846))
AC_MSG_RESULT($mpi)

AC_MSG_CHECKING(for M_LN10)
mln10=no
AC_TRY_COMPILE([#include <math.h>], 
     [ double f = M_LN10; ],
     mln10=yes,AC_DEFINE(M_LN10,2.30258509299404568402))
AC_MSG_RESULT($mln10)

AC_MSG_CHECKING(for MKISS (N_AX25 line discipline))
mkiss=no
AC_EGREP_CPP(yes,
     [#include <sys/ioctl.h>
     #ifdef N_AX25
       yes
     #endif
     ], mkiss=yes)
AC_MSG_RESULT($mkiss)

AC_MSG_CHECKING(for ifr_newname in struct ifreq)
ifrnewname=no
AC_TRY_COMPILE([#include <linux/if.h>],
     [struct ifreq ifr; ifr.ifr_newname[0]=0; ], AC_DEFINE(HAVE_IFRNEWNAME) ifrnewname=yes)
AC_MSG_RESULT($ifrnewname)

dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
else
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
fi

dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
  if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
  else
    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
  fi
else
  AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
fi

dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")

dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac
fi
changequote([,])dnl

if test x$ac_cv_cygwin = xyes -o x$ac_cv_mingw32 = xyes; then
  xcflags="$CFLAGS"
  CFLAGS="$CFLAGS -I$srcdir/directx/include -I$srcdir/directx/include/directx6"
  AC_MSG_CHECKING(for DirectX includes)
  directx=no
  AC_TRY_COMPILE([#include <directx.h>], 
       [ LPDIRECTSOUND dsplay; LPDIRECTSOUNDCAPTURE dsrec; ],
       AC_DEFINE(HAVE_DIRECTX) directx=yes)
  AC_MSG_RESULT($directx)
  CFLAGS="$xcflags"
fi

AC_ARG_ENABLE(driver,
[  --enable-driver         Build user mode driver],
[case "${enableval}" in
  yes) baydrv=true ;;
  no)  baydrv=false ;;
  *) AC_MSG_ERROR(bad value ${enableval} for --enable-driver) ;;
esac],[baydrv=false])

AC_ARG_ENABLE(mkiss,
[  --disable-mkiss         Don not use the MKISS driver even if available],
[mkissena=false],[mkissena=true])

if test x$mkiss = xyes; then
    AC_DEFINE(HAVE_MKISS)
fi

AC_ARG_ENABLE(ppuser,
[  --enable-ppuser         Enable PPUSER parport access method],
[ppuser=true],[ppuser=false])

if test x$ppuser = xtrue; then
    AC_DEFINE(HAVE_PPUSER)
fi

AC_ARG_ENABLE(ppkdrv,
[  --enable-ppkdrv         Enable Linux Kernel driver parport access method],
[ppkdrv=true],[ppkdrv=false])

if test x$ppkdrv = xtrue; then
    AC_DEFINE(HAVE_PPKDRV)
fi

dnl AM_CONDITIONAL(BAYCOMDRV, test x$baydrv = xtrue)
AM_CONDITIONAL(WIN32, test x$ac_cv_cygwin = xyes -o x$ac_cv_mingw32 = xyes)
AM_CONDITIONAL(CROSSCOMP, test x$cross_compiling = xyes)
AM_CONDITIONAL(BAYCOMDRV, test x$cross_compiling = xno -a x$mkiss = xyes)
AM_CONDITIONAL(HAVEGTK, test x$gtk = xyes)
AM_CONDITIONAL(PPUSER, test x$ppuser = xtrue)
AM_CONDITIONAL(PPKDRV, test x$ppkdrv = xtrue)
AM_CONDITIONAL(DIRECTX, test x$directx = xyes)

AC_SUBST(HAVE_MKISS)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(HAVE_IOFUNCS)
AC_SUBST(HAVE_BITTYPES)
AC_SUBST(M_PI)
AC_SUBST(LIBOBJS)
AC_SUBST(DRVLIBOBJS)
AC_SUBST(HAVE_IFRNEWNAME)
AC_SUBST(HAVE_PPUSER)
AC_SUBST(HAVE_PPKDRV)
AC_SUBST(HAVE_DIRECTX)
AC_OUTPUT([Makefile
directx/Makefile
main/Makefile
udriver/Makefile
eppdiag/Makefile
eppfm/Makefile
eppfm2/Makefile
eppfm2/src/Makefile
flexdrv/Makefile
ntdrv/Makefile
w9xdrv/Makefile])