File: configure.in

package info (click to toggle)
bottlerocket 0.05b3-17
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 404 kB
  • sloc: ansic: 1,837; sh: 170; makefile: 105; tcl: 92
file content (70 lines) | stat: -rw-r--r-- 1,275 bytes parent folder | download | duplicates (9)
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
dnl
dnl Autoconf script for bottlerocket
dnl

dnl make sure we have our files around.

AC_INIT(br_cmd.h)
AC_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL

dnl Define the function that peeks for getopt_long

AC_DEFUN(BR_CHECK_GETOPT_LONG,
[
AC_EGREP_HEADER(getopt_long, getopt.h, AC_DEFINE(HAVE_GETOPT_LONG))
])

AC_DEFUN(BR_CHECK_ISSETUGID,
[
AC_EGREP_HEADER(issetugid, unistd.h, AC_DEFINE(HAVE_ISSETUGID))
])

dnl
dnl Check for some headers
dnl
AC_CHECK_HEADERS(features.h errno.h sys/termios.h)


dnl
dnl Some other custom arguments
dnl
AC_ARG_ENABLE(debug, [  --enable-debug          Enable debugging code], AC_DEFINE(DEBUG))

dnl
dnl And find the port to use.
dnl
AC_DEFUN(BR_FIND_PORT,
[AC_ARG_WITH(x10port, [  --with-x10port=PATH     Specify the serial port for the x10 module],
[
case "$withval" in
	*) X10PORT="$withval" ;;
esac],
[
X10PORT="auto"
])

if test "$X10PORT" = "auto"
then
  echo "guessing x10 port"
  for port in /dev/ttyS0 /dev/cua0 /dev/cuaa0 /dev/tty00 /dev/ttya
  do
    if test -c $port
    then
      X10PORT=$port;
      break
    fi
  done
fi
echo "using $X10PORT for x10 port"
])

dnl Check for important programs, like the C compiler.

BR_FIND_PORT
BR_CHECK_GETOPT_LONG
BR_CHECK_ISSETUGID
AC_SUBST(X10PORT)
AC_OUTPUT(Makefile)