-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathconfigure.ac
More file actions
148 lines (138 loc) · 4.55 KB
/
Copy pathconfigure.ac
File metadata and controls
148 lines (138 loc) · 4.55 KB
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
AC_INIT([qodem], [1.0.0])
AC_CONFIG_SRCDIR([source/qodem.h])
AM_CONFIG_HEADER([source/config.h])
AM_INIT_AUTOMAKE([foreign subdir-objects])
dnl Checks for programs
AC_PROG_CC
AC_PROG_INSTALL
dnl Set Q_NO_NEWTERM by default so that Arch Linux works out of the box.
CFLAGS="$CFLAGS -DQ_NO_NEWTERM"
dnl Checks for header files.
AC_CHECK_HEADERS(sys/select.h)
AC_CHECK_HEADERS(pty.h)
AC_CHECK_HEADERS(libutil.h)
AC_CHECK_HEADERS(util.h)
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(ncursesw/curses.h)
AC_CHECK_HEADERS(miniupnpc/miniupnpc.h)
dnl Checks for libraries
AC_SEARCH_LIBS(forkpty, util)
AC_CHECK_FUNCS(forkpty)
AC_CHECK_LIB([ncursesw], [mvwadd_wch], Q_HAS_NCURSES="yes", Q_HAS_NCURSES="no")
AC_CHECK_LIB([ncurses], [mvwadd_wch], Q_HAS_NCURSES_APPLE="yes", Q_HAS_NCURSES_APPLE="no")
AC_CHECK_LIB([miniupnpc], [upnpDiscover], Q_USE_SYSTEM_UPNP="yes", Q_USE_SYSTEM_UPNP="no")
dnl SDL is an argument
disable_sdl=no
AC_ARG_ENABLE(sdl, [ --disable-sdl Don't use libSDL for beeps/music])
AC_CHECK_LIB([SDL], [SDL_Init], AS_VAR_SET([Q_HAVE_LIBSDL], [yes]))
if test "x$enable_sdl" = "xyes" ; then
disable_sdl=no
else
if test "x$enable_sdl" = "x" ; then
disable_sdl=no
else
disable_sdl=yes
fi
fi
if test "x$disable_sdl" = "xyes"; then
AC_MSG_NOTICE([ *** Disable SDL *** ])
else
if test "x$Q_HAVE_LIBSDL" = "x"; then
AC_MSG_NOTICE([ *** SDL unavailable *** ])
else
AC_MSG_NOTICE([ *** Enable SDL *** ])
CFLAGS="$CFLAGS -DQ_SOUND_SDL"
LIBS="-lSDL -lm $LIBS"
fi
fi
dnl serial is an argument
disable_serial=no
AC_ARG_ENABLE(serial, [ --disable-serial Disable serial port/modem])
if test "x$enable_serial" = "xyes" ; then
disable_serial=no
else
if test "x$enable_serial" = "x" ; then
disable_serial=no
else
disable_serial=yes
fi
fi
if test "x$disable_serial" = "xyes"; then
AC_MSG_NOTICE([ *** Disable serial port / modem support *** ])
CFLAGS="$CFLAGS -DQ_NO_SERIAL"
fi
dnl X11 build option
AC_ARG_ENABLE(x11, [ --enable-x11 Enable PDCurses-based X11 build])
if test "x$enable_x11" = "xyes"; then
subdirs="lib/pdcurses $subdirs"
LIBS="$LIBS lib/pdcurses/libXCurses.a"
LDFLAGS="$LD_FLAGS -lXaw -lXmu -lXt -lX11 -lXpm"
CFLAGS="$CFLAGS -Ilib/pdcurses/include -DQ_PDCURSES"
fi
AC_SUBST(subdirs)
if test "x$enable_x11" = "xyes"; then
AC_MSG_NOTICE([ *** Using PDCurses X11 build instead of ncurses *** ])
AC_SUBST(QODEMX11, "yes")
else
if test "x$Q_HAS_NCURSES" = "xyes"; then
AC_MSG_NOTICE([ *** ncurses found *** ])
LIBS="-lncursesw $LIBS"
else
if test "x$Q_HAS_NCURSES_APPLE" = "xyes"; then
AC_MSG_NOTICE([ *** ncurses found *** ])
LIBS="-lncurses $LIBS"
else
AC_MSG_ERROR([ *** Error: the ncurses development library appears to be unavailable. Please install the wide-char ncurses development library. This is often called libncursesw5-dev, libncurses5w-dev, or ncurses-devel. ])
fi
fi
fi
AM_CONDITIONAL(Q_X11_BUILD, [test "x$enable_x11" = "xyes"])
dnl cryptlib support option - default is NO
disable_ssh=yes
AC_ARG_ENABLE(ssh, [ --enable-ssh Enable internal ssh (via cryptlib)])
if test "x$enable_ssh" = "xyes" ; then
AC_MSG_NOTICE([ --- Cryptlib requested --- ])
disable_ssh=no
else
AC_MSG_NOTICE([ --- Cryptlib default: disable --- ])
disable_ssh=yes
fi
if test "x$disable_ssh" = "xyes"; then
AC_MSG_NOTICE([ *** Disable cryptlib *** ])
else
AC_MSG_NOTICE([ *** Enable cryptlib *** ])
subdirs="lib/cryptlib $subdirs"
LIBS="$LIBS lib/cryptlib/libcl.a -lpthread"
CFLAGS="$CFLAGS -DQ_SSH_CRYPTLIB -Ilib/cryptlib"
fi
AC_SUBST(subdirs)
dnl UPnP support option - default is YES
disable_upnp=no
if test "x$enable_upnp" = "xyes" ; then
disable_upnp=no
else
if test "x$enable_upnp" = "x" ; then
disable_upnp=no
else
disable_upnp=yes
fi
fi
AC_ARG_ENABLE(upnp, [ --disable-upnp Disable UPnP (via libminiupnpc)])
if test "x$disable_upnp" = "xyes"; then
AC_MSG_NOTICE([ *** Disable UPnP *** ])
else
AC_MSG_NOTICE([ *** Enable UPnP *** ])
if test "x$Q_USE_SYSTEM_UPNP" = "xyes"; then
AC_MSG_NOTICE([ *** Using system-provided UPnP library *** ])
LIBS="$LIBS -lminiupnpc"
CFLAGS="$CFLAGS -DQ_UPNP -DQ_USE_SYSTEM_UPNP"
else
subdirs="lib/upnp $subdirs"
AC_MSG_NOTICE([ *** Using local UPnP library *** ])
LIBS="$LIBS lib/upnp/libminiupnpc.a"
CFLAGS="$CFLAGS -DQ_UPNP -Ilib/upnp"
fi
fi
AC_SUBST(subdirs)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT