-
Notifications
You must be signed in to change notification settings - Fork 10
/
configure.ac
130 lines (115 loc) · 4.31 KB
/
configure.ac
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
# gopenvpn - a GTK based GUI front-end for OpenVPN
#
# Copyright (C) 2006-2012 Gary Grossman <[email protected]>
# Copyright (C) 2012- David Sommerseth <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
AC_PREREQ([2.59])
AC_INIT([gopenvpn], [0.8], [[email protected]])
AC_CONFIG_AUX_DIR([.])
dnl AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AM_INIT_AUTOMAKE([foreign -Wno-portability -Wno-obsolete tar-ustar])
AM_GNU_GETTEXT_VERSION([0.18.1])
AM_GNU_GETTEXT([external])
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
# Checks for libraries
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([socket strrchr])
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h paths.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
# Checks for library functions.
AC_FUNC_FORK
AC_CHECK_FUNCS([socket strrchr])
# Checks for needed packages (pkg-config)
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(GTK, gtk+-2.0)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_MODULES(GLADE, libglade-2.0)
AC_SUBST(GLADE_CFLAGS)
AC_SUBST(GLADE_LIBS)
PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1)
AC_SUBST(GNOME_KEYRING_CFLAGS)
AC_SUBST(GNOME_KEYRING_LIBS)
PKG_CHECK_MODULES(X11, x11)
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)
PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.96)
# Check for PolicyKit pkexec - can be overridden by --with-pkexec
AC_ARG_WITH([pkexec],
AC_HELP_STRING([--with-pkexec=/path/to/pkexec], [Full path to PolicyKit pkexec]))
if test "x${with_pkexec}" = x; then
# Auto-detect path if no explicit path was set
AC_PATH_PROGS([PKEXEC_BINPATH], [pkexec],, [$PATH])
if test -x "$PKEXEC_BINPATH"; then
AC_DEFINE_UNQUOTED([USE_PKEXEC], [1], [Use pkexec for privileged operations])
AC_DEFINE_UNQUOTED([PKEXEC_BINARY_PATH], ["$PKEXEC_BINPATH"], [Path to PolicyKit pkexec])
else
AC_MSG_WARN([PolicyKit pkexec was not found])
fi
else
if ! test "x${with_pkexec}" = xno; then
AC_DEFINE_UNQUOTED([USE_PKEXEC], [1], [Use pkexec for privileged operations])
AC_DEFINE_UNQUOTED([PKEXEC_BINARY_PATH], ["$with_pkexec"], [Path to PolicyKit pkexec])
else
AC_MSG_WARN([PolicyKit is not enabled])
fi
fi
AM_CONDITIONAL([INSTALL_GOVPNSTART], [test ! -z $USE_PKEXEC])
# Check for gedit - can be overridden by --with-gedit
AC_ARG_WITH([gedit],
AC_HELP_STRING([--with-gedit=/path/to/gedit], [Full path to gedit]))
if test "x${with_gedit}" = x; then
# Auto-detect path if no explicit path was set
AC_PATH_PROGS([GEDIT_BINPATH], [gedit],, [$PATH])
if test -x "GEDIT_BINPATH"; then
AC_MSG_ERROR([gedit was not found])
fi
else
if ! test "x${with_gedit}" = xno; then
GEDIT_BINARY_PATH="$with_gedit"
fi
fi
AC_DEFINE_UNQUOTED([GEDIT_BINARY_PATH], ["$GEDIT_BINPATH"], [Path to gedit])
# Check for openvpn - can be overridden by --with-openvpn
AC_ARG_WITH([openvpn],
AC_HELP_STRING([--with-openvpn=/path/to/openvpn], [Full path to openvpn]))
if test "x${with_openvpn}" = x; then
# Auto-detect path if no explicit path was set
AC_PATH_PROGS([OPENVPN_BINPATH], [openvpn],, [$PATH])
if test -x "OPENVPN_BINPATH"; then
AC_MSG_ERROR([OpenVPN binary not found])
fi
else
if ! test "x${with_openvpn}" = xno; then
OPENVPN_BINPATH="$with_openvpn"
fi
fi
AC_DEFINE_UNQUOTED([OPENVPN_BINARY_PATH], ["$OPENVPN_BINPATH"], [Path to OpenVPN])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/gopenvpn.h])
AC_CONFIG_FILES([pixmaps/Makefile
po/Makefile.in
polkit/Makefile
src/Makefile
Makefile])
AC_OUTPUT