File: configure.in

package info (click to toggle)
mwavem 1.0.2-11
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,204 kB
  • ctags: 6,561
  • sloc: ansic: 54,209; sh: 2,929; makefile: 417
file content (128 lines) | stat: -rw-r--r-- 3,450 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
dnl configure.in
dnl

AC_INIT

dnl Find operating system, vendor, architecture
AC_CANONICAL_SYSTEM

AM_INIT_AUTOMAKE(mwavem,1.0.2)

dnl Find programs for building and installation.
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL

dnl Check for libraries
AC_CHECK_LIB(pthread, main)
AC_CHECK_LIB(m, main)

dnl Evaluated in src/drivers/mwavepub.h
AC_DEFINE(MWAVEM_APP_DIST)

dnl global
AC_DEFINE(DEBUG)
AC_DEFINE(LINUX_BLD)
AC_DEFINE(DLL)
dnl meio
AC_DEFINE(WORLDTRADE_VERSION)
dnl mwwtt32
AC_DEFINE(MWWTDBG)

INCLUDES="-I\$(top_srcdir)/src/include -I\$(top_srcdir)/src/drivers"
CFLAGS="$INCLUDES -O2 -fomit-frame-pointer -Wall"

dnl Set dsp_dir here and we substitute it in mwavem.conf from mwavem.conf.in
dsp_dir=`	test "x$exec_prefix" = xNONE && exec_prefix=$ac_default_prefix
		test "x$prefix" = xNONE && prefix=${exec_prefix}
		eval echo "$datadir/$PACKAGE"`
AC_SUBST(dsp_dir)

dnl Set dsp_dir here and we substitute it in modem.c from mwavem.c.in
mwavem_bin_dir=`	test "x$exec_prefix" = xNONE && exec_prefix=$ac_default_prefix
			test "x$prefix" = xNONE && prefix=${exec_prefix}
			eval echo "$bindir"`
AC_SUBST(mwavem_bin_dir)

dnl Set dsp_dir here and we substitute it in modem.c from mwavem.c.in
mwavem_conf_dir=`	test "x$exec_prefix" = xNONE && exec_prefix=$ac_default_prefix
			test "x$prefix" = xNONE && prefix=${exec_prefix}
			eval echo "$sysconfdir"`

AC_SUBST(mwavem_conf_dir)

AC_ARG_ENABLE(mwavedd,
  [  --disable-mwavedd		do not build the mwave device driver kernel module ]
)

AC_ARG_ENABLE(mwtrace,
  [  --disable-mwtrace		do not build tracing into the mwave device driver kernel module ]
)

if test "$enable_mwtrace" != "no" ; then
mwtrace="-DMW_TRACE"
else
mwtrace=""
fi

AC_ARG_WITH(linuxsrcdir,
  [  --with-linuxsrcdir=DIR	if building the mwave device driver, specify path to linux kernel source [/usr/src/linux] ],,
  with_linuxsrcdir=/usr/src/linux
)

if test "$enable_mwavedd" != "no" ; then
linux_kernel_src_version=`(
./getkver $with_linuxsrcdir
)`

linux_kernel_run_version=`(
uname -r
)`

found_linuxsrcdir=`(
  test -f $with_linuxsrcdir/include/linux/modversions.h && echo "YES"
)`

drivers="drivers"
if test "$found_linuxsrcdir" = "YES" ; then
  echo "found linux source directory...  $with_linuxsrcdir"
else
  AC_MSG_ERROR([*** You must specify the correct path to your linux kernel source tree in order to build the driver module.  If you do not wish to build the driver module from this distribution, you must specify --disable-mwavedd when you run ./configure.])
fi
else
  drivers=''
fi


AC_SUBST(drivers)
AC_SUBST(with_linuxsrcdir)
AC_SUBST(mwtrace)
AC_SUBST(linux_kernel_src_version)

dnl All of our Makefiles
AC_OUTPUT(	Makefile \
		doc/Makefile \
		m4/Makefile \
		src/Makefile \
		src/drivers/Makefile \
		src/dsp/Makefile \
		src/mwavem/Makefile \
		src/mwavem/modem.c \
		src/mwavem/mwaved \
		src/mwavem/mwavem.conf \
		src/manager/Makefile \
		src/meio/Makefile \
		src/mwmbl/Makefile \
		src/mwmlw32/Makefile \
		src/mwmpw32/Makefile \
		src/mwmutil/Makefile \
		src/mwwtt32/Makefile
		)

if test "$enable_mwavedd" != "no" ; then
if test "$linux_kernel_src_version" != "$linux_kernel_run_version" ; then
  AC_MSG_WARN([*** Your linux kernel source tree is version $linux_kernel_src_version while your running kernel is version $linux_kernel_run_version.  If you wish to use the device driver module from this distribution, be sure to use the kernel which was built with the same kernel source tree.])
fi
fi