forked from aszeszo/nwam-manager
-
Notifications
You must be signed in to change notification settings - Fork 8
/
configure.in
213 lines (185 loc) · 4.67 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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
AC_PREREQ(2.54)
AC_INIT([nwam-manager], [1.151.0], [null])
AC_CONFIG_SRCDIR([daemon])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
GNOME_DOC_INIT
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
dnl
dnl Check for C Compiler
dnl
AC_PROG_CC
AC_PROG_CPP
AC_LANG_C
AC_ISC_POSIX
AC_HEADER_STDC
AM_DISABLE_STATIC
AC_TYPE_SIGNAL
dnl
dnl Internationalization
dnl
AM_PROG_LIBTOOL
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
GETTEXT_PACKAGE="$PACKAGE"
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
AM_GLIB_DEFINE_LOCALEDIR(NWAM_MANAGER_LOCALEDIR)
dnl
dnl Warning flags
dnl
CFLAGS_WARNINGS="-Wall -Wmissing-prototypes -Wmissing-declarations -Wparentheses -Wpointer-arith"
CXXFLAGS_WARNINGS="-Wall -Wparentheses -Wpointer-arith"
if test "x$GCC" = x; then
CFLAGS_WARNINGS=""
CXXFLAGS_WARNINGS=""
fi
AM_CFLAGS="$AM_CFLAGS $CFLAGS_WARNINGS"
AM_CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS_WARNINGS"
dnl
dnl nwam_core flags
dnl
AC_ARG_ENABLE(private-nwam-headers,
[ --enable-private-nwam-headers[=yes|no|path_to] Enable private nwam headers],
[ private_nwam_headers=$enableval ],[ private_nwam_headers=yes])
if test x$private_nwam_headers = xyes; then
AM_CFLAGS="$AM_CFLAGS -I$PWD/nwam_core/usr/include"
elif test x$private_nwam_headers != xno; then
AM_CFLAGS="$AM_CFLAGS -I$private_nwam_headers"
fi
AC_SUBST(AM_CFLAGS)
AC_ARG_ENABLE(private-nwam-libs,
[ --enable-private-nwam-libs[=yes|no|path_to] Enable private nwam libs],
[ private_nwam_libs=$enableval ],[ private_nwam_libs=yes])
_NWAM_CPU=`uname -p`
if test x$private_nwam_libs = xyes; then
NWAM_LIBS="-lnsl -L$PWD/nwam_core/lib/${_NWAM_CPU} -lnwam"
elif test x$private_nwam_libs != xno; then
NWAM_LIBS="-lnsl -L$private_nwam_libs -lnwam"
else
NWAM_LIBS="-lnsl -lnwam"
fi
AC_CHECK_LIB(nsl $NWAM_LIBS, nwam_ncp_walk_ncus,
[AC_DEFINE(HAVE_NWAM, 1, [Define to 1 if the libnwam library is present.])], [AC_MSG_ERROR(
***
*** libnwam was not found.
***
)
])
AC_SUBST(NWAM_LIBS)
dnl
dnl Enable debugging mode
dnl
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug messages],
AM_CFLAGS="$AM_CFLAGS -DDEBUG"
AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_CXXFLAGS)
dnl
dnl Check for pkgconfig
dnl
AC_PATH_PROG(PKG_CONFIG, pkg-config,no)
if test x$PKG_CONFIG = xno; then
AC_MSG_ERROR(Please install the pkg-config package from http://www.freedesktop.org/software/pkgconfig/)
fi
dnl
dnl Internatinalization
dnl
dnl Set ALL_LINGUAS when a translation is added
ALL_LINGUAS=""
GETTEXT_PACKAGE=nwam-manager
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])
PKG_CHECK_MODULES(NWAM_MANAGER,
glib-2.0 gconf-2.0 gtk+-2.0 >= 2.6.0
libnotify >= 0.3.0)
AC_SUBST(NWAM_MANAGER_CFLAGS)
AC_SUBST(NWAM_MANAGER_LIBS)
dnl
dnl gconf checks
dnl
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2
dnl
dnl DLADM checks
dnl
AC_CHECK_FILE(/lib/64/libdladm.so.1,
[DLADM_LIBS="/lib/64/libdladm.so.1 -lsocket -lnsl"
AC_DEFINE(HAVE_DLADM, 1, [Define to 1 if the libdladm library is present.])],
[AC_MSG_ERROR(
***
*** /lib/64/libdladm.so.1 was not found.
***
)])
AC_SUBST(DLADM_LIBS)
dnl
dnl SECDB checks
dnl
AC_CHECK_LIB(secdb, chkauthattr,
[SECDB_LIBS="-lsecdb"
AC_DEFINE(HAVE_SECDB, 1, [Define to 1 if the libsecdb library is present.])],
[AC_MSG_ERROR(
***
*** libsecdb was not found.
***
)])
AC_SUBST(SECDB_LIBS)
dnl
dnl SCF/SMF checks
dnl
AC_CHECK_LIB(scf, scf_handle_create,
[SCF_LIBS="-lscf"
AC_DEFINE(HAVE_SECDB, 1, [Define to 1 if the libscf library is present.])],
[AC_MSG_ERROR(
***
*** libscf was not found.
***
)])
AC_SUBST(SCF_LIBS)
dnl
dnl KSTAT checks
dnl
AC_CHECK_LIB(kstat, kstat_open,
[KSTAT_LIBS="-lkstat"
AC_DEFINE(HAVE_KSTAT, 1, [Define to 1 if the libkstat library is present.])],
[AC_MSG_ERROR(
***
*** libkstat was not found.
***
)])
AC_SUBST(KSTAT_LIBS)
AC_CONFIG_FILES([
Makefile
common/Makefile
tests/Makefile
daemon/Makefile
capplet/Makefile
help/Makefile
po/Makefile.in
pixmaps/Makefile
pixmaps/16x16/Makefile
pixmaps/16x16/status/Makefile
pixmaps/24x24/Makefile
pixmaps/24x24/apps/Makefile
pixmaps/24x24/emblems/Makefile
pixmaps/24x24/status/Makefile
pixmaps/32x32/Makefile
pixmaps/32x32/apps/Makefile
pixmaps/32x32/emblems/Makefile
pixmaps/32x32/status/Makefile
pixmaps/48x48/Makefile
pixmaps/48x48/apps/Makefile
pixmaps/48x48/status/Makefile
data/Makefile
ui/Makefile
])
AC_OUTPUT([
])