Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 159 lines (138 sloc) 5.337 kb
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
1 AC_PREREQ(2.50)
bcc0f95 inakypg release: prepare and roll 1.4.5
inakypg authored
2 AC_INIT([WiMAX low level tools], [1.4.5],
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
3 [linux-wimax@intel.com], [wimax-tools])
4 AC_CONFIG_SRCDIR([lib/internal.h])
5 AM_INIT_AUTOMAKE
d1d1fc1 config.h,version.h: move around so other modules can use it
Inaky Perez-Gonzalez authored
6 AM_CONFIG_HEADER(include/config.h)
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
7
3f0448d inakypg autoconf: add silent mode
inakypg authored
8 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
9 AM_MAINTAINER_MODE
10
11 AC_PREFIX_DEFAULT(/usr/local)
12
13 if (test "${CFLAGS}" = ""); then
14 CFLAGS="-g -Wall -O2"
15 fi
16
17 AC_LANG_C
18 AC_PROG_CC
19 AC_PROG_INSTALL
20 AC_PROG_LIBTOOL
21
22 AC_ARG_ENABLE(doxygen-doc,
23 AC_HELP_STRING([--enable-doxygen-doc],
24 [Generate documentation with Doxygen]),
25 doxygen_doc=$enableval,doxygen_doc=auto)
26
27 AC_PATH_PROG(DOXYGEN, doxygen, no)
28 AC_MSG_CHECKING([if Doxygen documentation should be built])
29 if test zz$DOXYGEN = zzno
30 then
31 doxygen=no
32 else
33 doxygen=yes
34 fi
35
36 case zz$doxygen_doc in
37 zzauto)
38 do_doxygen=$doxygen;;
39 zzyes)
40 if test zz$doxygen = zzno
41 then
42 AC_MSG_ERROR([Doxygen docs forced on with --enable-doxygen-doc, but can't find doxygen!])
43 fi
44 do_doxygen=yes;;
45 zzno)
46 do_doxygen=no;;
47 *)
48 AC_MSG_ERROR([Unknown enable val "$doxygen_doc" to --enable-doxygen-doc])
49 esac
50
51 AM_CONDITIONAL(DOXYGEN_DOC, test zz$do_doxygen = zzyes)
52 AC_MSG_RESULT($do_doxygen)
53
54
55 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
56 [enable compiling with debugging information]), [
57 if (test "${enableval}" = "yes" &&
58 test "${ac_cv_prog_cc_g}" = "yes"); then
59 CFLAGS="$CFLAGS -g"
60 fi
61 ])
62
63 # If libnl-1 is installed
64 AC_ARG_WITH(libnl1,
65 AC_HELP_STRING([--with-libnl1],
66 [prefix to libnl (>=1.0-pre7) installation; defaults to
67 whichever is found in the system with pkg-config.
68 USE ABSOLUTE PATHS.]),
69 export PKG_CONFIG_PATH="$withval:$withval/lib/pkgconfig")
70 PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre7)
71 libnl1_prefix=`pkg-config "libnl-1 >= 1.0-pre7" --variable=prefix`
72 AC_MSG_RESULT(Using libnl1 from $libnl1_prefix)
73 AC_SUBST(LIBNL1_CFLAGS)
74 AC_SUBST(LIBNL1_LIBS)
75
549b31a autoconf: deprecate --with-i2400m, replace w/ --with-linux
Inaky Perez-Gonzalez authored
76 # Linux WiMAX stack
77 LINUX_KERNEL=/usr
78 AC_ARG_WITH(linux,
79 AC_HELP_STRING([--with-linux],
80 [path to the Linux kernel headers/source (containing the
81 definitions for the WiMAX stack); defaults to what
82 is installed in your system's /usr/include/linux.
83 USE ABSOLUTE PATHS.]),
84 [
85 LINUX_KERNEL="$withval"
86 ])
87 # Old, for backwards compat
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
88 AC_ARG_WITH(i2400m,
89 AC_HELP_STRING([--with-i2400m],
549b31a autoconf: deprecate --with-i2400m, replace w/ --with-linux
Inaky Perez-Gonzalez authored
90 [path to the Linux kernel headers/source (containing the
91 definitions for the WiMAX stack); defaults to what
92 is installed in your system's /usr/include/linux.
93 DEPRECATED: this option will be removed soon.
94 USE ABSOLUTE PATHS.]),
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
95 [
549b31a autoconf: deprecate --with-i2400m, replace w/ --with-linux
Inaky Perez-Gonzalez authored
96 LINUX_KERNEL="$withval"
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
97 ])
549b31a autoconf: deprecate --with-i2400m, replace w/ --with-linux
Inaky Perez-Gonzalez authored
98 AC_MSG_RESULT(Using Linux WiMAX stack from $LINUX_KERNEL)
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
99
549b31a autoconf: deprecate --with-i2400m, replace w/ --with-linux
Inaky Perez-Gonzalez authored
100 AC_CHECK_FILE([$LINUX_KERNEL/include/linux/wimax.h],
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
101 [AC_DEFINE([HAVE_WIMAX_H], 1, [Define to 1 if you have <linux/wimax.h>.])],
549b31a autoconf: deprecate --with-i2400m, replace w/ --with-linux
Inaky Perez-Gonzalez authored
102 [AC_MSG_ERROR([Can't locate include/linux/wimax.h in $LINUX_KERNEL])])
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
103
104 # Dirty (as in very dirty) version compatibility check
105 #
106 # To make sure it works during cross compiles, we extract by hand the
107 # value of WIMAX_GNL_VERSION.
549b31a autoconf: deprecate --with-i2400m, replace w/ --with-linux
Inaky Perez-Gonzalez authored
108 wimax_h=${LINUX_KERNEL}/include/linux/wimax.h
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
109 wimax_gnl_version=[$(grep '^[[:space:]]*WIMAX_GNL_VERSION[[:space:]]*=[[:space:]]*[0-9]\+,$' $wimax_h \
110 | sed 's/^[[:space:]]*WIMAX_GNL_VERSION[[:space:]]*=[[:space:]]*\([0-9]\+\),$/\1/')]
111 wimax_gnl_vmajor=$(($wimax_gnl_version / 10))
112 wimax_gnl_vminor=$(($wimax_gnl_version % 10))
def7326 release: v1.3.95
Inaky Perez-Gonzalez authored
113 need_vmajor=0
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
114 need_vminor=0
115 if test $wimax_gnl_vmajor != $need_vmajor
116 then
117 AC_MSG_ERROR([WiMAX kernel support has major version $wimax_gnl_vmajor, this software needs $need_vmajor])
118 fi
119 if test $wimax_gnl_vminor -lt $need_vminor
120 then
121 AC_MSG_ERROR([WiMAX kernel support has minor version $wimax_gnl_vminor, this software needs at least $need_vminor])
122 fi
123
fabc48d libwimaxll: add helpers to translate state names to values and back
Inaky Perez-Gonzalez authored
124 AC_SUBST(I2400M_INCLUDES, "-I${LINUX_KERNEL}/include")
125 AC_SUBST(LINUX_INCLUDE_PATH, "${LINUX_KERNEL}/include")
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
126
ddc0b93 autoconf: check the kernel exposes WIMAX_GNL_OP_STATE_GET
Inaky Perez-Gonzalez authored
127 AC_CHECK_DECL(WIMAX_GNL_OP_STATE_GET,
128 AC_MSG_NOTICE([Kernel / WiMAX driver is ok (> 2.6.30); has WIMAX_GNL_OP_STATE_GET]),
129 AC_MSG_ERROR([Kernel / WiMAX driver is too old (<= 2.6.30); missing WIMAX_GNL_OP_STATE_GET]),
130 [#include <$LINUX_INCLUDE_PATH/linux/wimax.h>])
131
5d226de wimaxll: add new dynamically expandable command line tool
Inaky Perez-Gonzalez authored
132 AC_CHECK_LIB(dl, dlopen, dummy=yes,
133 AC_MSG_ERROR(dynamic linking loader is required))
134
3f87467 autoconf: glib 2.14 is good enough
Inaky Perez-Gonzalez authored
135 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14, dummy=yes,
136 AC_MSG_ERROR(GLib >= 2.14 is required))
5d226de wimaxll: add new dynamically expandable command line tool
Inaky Perez-Gonzalez authored
137 AC_SUBST(GLIB_CFLAGS)
138 AC_SUBST(GLIB_LIBS)
139
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
140
141 AC_OUTPUT(Makefile
4c51775 inakypg rpm: commit spec file
inakypg authored
142 wimax-tools.spec
143 wimax-tools.yaml
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
144 doc/Makefile
145 doc/doxygen.conf
146 libwimaxll-0.pc
147 libwimaxll-0-uninstalled.pc
0eff316 libwimaxll-i2400m: add pkg-config file
Inaky Perez-Gonzalez authored
148 libwimaxll-i2400m-0.pc
149 libwimaxll-i2400m-0-uninstalled.pc
d8cebf5 wimaxll: add pkg-config file for wimaxll plugins
Inaky Perez-Gonzalez authored
150 wimaxll-cmd-0.pc
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
151 bin/Makefile
152 bin/wimax-tools-version
153 include/Makefile
154 include/wimaxll-version.h
d1d1fc1 config.h,version.h: move around so other modules can use it
Inaky Perez-Gonzalez authored
155 include/wimaxll/Makefile
156 include/wimaxll/version.h
643669b Import v1.3.93
Inaky Perez-Gonzalez authored
157 lib/Makefile
158 src/Makefile)
Something went wrong with that request. Please try again.