-
Notifications
You must be signed in to change notification settings - Fork 8
/
configure.in
55 lines (43 loc) · 1.25 KB
/
configure.in
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
AC_SUBST(TARGET)
dnl Process this file with autoconf to produce a configure script.
AC_INIT(statusq.c)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_CANONICAL_SYSTEM
dnl Checks for libraries.
case "$target_os" in
mingw32)
LIBS="-lws2_32 $LIBS"
;;
unix | linux | *posix*)
AC_CHECK_LIB(xnet, socket)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(resolv, inet_aton)
;;
esac
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/time.h)
AC_CHECK_HEADERS(stdint.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_TYPE(uint8_t, [AC_DEFINE(my_uint8_t, uint8_t)], [AC_CHECK_TYPE(u_int8_t, [AC_DEFINE(my_uint8_t, u_int8_t)])])
AC_CHECK_TYPE(uint16_t, [AC_DEFINE(my_uint16_t, uint16_t)], [AC_CHECK_TYPE(u_int16_t, [AC_DEFINE(my_uint16_t, u_int16_t)])])
AC_CHECK_TYPE(uint32_t, [AC_DEFINE(my_uint32_t, uint32_t)], [AC_CHECK_TYPE(u_int32_t, [AC_DEFINE(my_uint32_t, u_int32_t)])])
AC_C_CONST
AC_HEADER_TIME
dnl Checks for library functions.
AC_CHECK_FUNCS(snprintf inet_aton socket)
case "$target_os" in
mingw32 | cygwin)
AC_DEFINE(WINDOWS)
TARGET=nbtscan.exe
;;
unix | linux)
AC_DEFINE(UNIX)
BINDIR=$prefix/bin
TARGET=nbtscan
;;
esac
AC_SUBST(BINDIR)
AC_OUTPUT(Makefile)