~ubuntu-branches/debian/sid/open-vm-tools/sid

« back to all changes in this revision

Viewing changes to .pc/do-not-build-vsock-on-linux-kernels-3.9/configure.ac

  • Committer: Package Import Robot
  • Author(s): Bernd Zeimetz, Bernd Zeimetz, Norbert Lange
  • Date: 2014-09-20 17:21:27 UTC
  • Revision ID: package-import@ubuntu.com-20140920172127-36w0utnlo1n7oplb
Tags: 2:9.4.6-1770165-3
[ Bernd Zeimetz ]
* [b04735fa] Ensure LINUX_BACKPORT is defined in patches/kuid_t-kgid_t-fix-for-3.12.

[ Norbert Lange ]
* [01aaa407] Fix initramfs hook for the vmxnet module
* [5279fa17] Move the dkms module location patch before otehr patches
   changing the dkms.conf file. this eases adding or removing those patches
* [b1db2b5c] Move files belonging to modules in dkms package.
  Call update-initramfs for the dkms package. Otherwise the initrd wont
  contain the vmxnet module if you installed the dkms package after the
  tools package. Move the module scripts to the dmks package.
  The modules in the dkms package should work without the tools now.

[ Bernd Zeimetz ]
* [d0ccee4f] Run #DEBHELPER# first in open-vm-tools-dkms.postinst.
  Otherwise dkms was not called and the module is not built yet.
* [f680b4fa] Run update-initramfs in open-vm-tools-dkms.postrm.
  Otherwise a removed module stays in the initrd.
* [ef4bd019] Remove unused DEPRECATED define.
  The dkms module ftbfs with 3.16 as DEPRECATED is define in the kernel
  source already.
  Thanks to Benjamin Kaduk (Closes: #761924)
* [5389dd1f] Some more fixes to make dkms build on 3.16
* [4c1f5fa7] Drop dkms.conf patches.
  Ship the dkms.conf file in debian/local instead.
* [805ccb06] Tidying patches.
  - Removing those for kernel modules we don't build anymore
  - Taking fixes for current issues from Arch
  - Sorting patches into from_fedora / from_arch / debian directories.
  This will break backports to wheezy.
* [519191ff] Fix dh_dkms call for new dkms.conf

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
################################################################################
2
 
### Copyright 2007 VMware, Inc.  All rights reserved.
3
 
###
4
 
### Configure script for building the VMware OSS Tools.
5
 
###
6
 
###
7
 
### This program is free software; you can redistribute it and/or modify
8
 
### it under the terms of version 2 of the GNU General Public License as
9
 
### published by the Free Software Foundation.
10
 
###
11
 
### This program is distributed in the hope that it will be useful,
12
 
### but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
### GNU General Public License for more details.
15
 
###
16
 
### You should have received a copy of the GNU General Public License
17
 
### along with this program; if not, write to the Free Software
18
 
### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
################################################################################
20
 
 
21
 
################################################################################
22
 
# In addition to the usual environment variables and command line
23
 
# arguments that a configure script usually takes (CFLAGS, LDFLAGS,
24
 
# etc.), this script also accepts variables of the form:
25
 
#
26
 
#  CUSTOM_LIB_CPPFLAGS: compile-time flags for LIB
27
 
#  CUSTOM_LIB_LIBS: link-time flags for LIB
28
 
#  RPCGENFLAGS: extra flags to pass to rpcgen
29
 
#
30
 
# The following libraries are currently tested: DNET, FUSE, GLIB2, GMODULE,
31
 
# GOBJECT, GTHREAD, GTK, GTKMM, ICU, LIBPNG, PAM, PROCPS, URIPARSER, ZLIB
32
 
#
33
 
# For the procps library: you can provide the name of the procps library on
34
 
# your system by defining CUSTOM_PROCPS_NAME. By default the configure script
35
 
# will try both "-lproc" and "-lproc-3.2.7".
36
 
################################################################################
37
 
 
38
 
###
39
 
### Initialization
40
 
###
41
 
 
42
 
TOOLS_VERSION="9.4.6"
43
 
AC_INIT(
44
 
   [open-vm-tools],
45
 
   [9.4.6],
46
 
   [open-vm-tools-devel@lists.sourceforge.net])
47
 
 
48
 
# In order to make this configure script auto-detect situations where
49
 
# people have a 32-bit userland running with a 64-bit kernel, we try to ask
50
 
# the compiler (assumedly gcc) for its default Target:.
51
 
# We have to set up $TEST_CC manually, since AC_PROG_CC hasn't yet been run (and can't be until AC_CANONICAL_HOST & AC_CANONICAL_BUILD are run)
52
 
# The purpose of all this is to set up $host_alias/$build_alias in a more
53
 
# intelligent way than config.guess currently does.
54
 
TEST_CC="$CC_FOR_BUILD"
55
 
test -z "$TEST_CC" && TEST_CC="$HOST_CC"
56
 
test -z "$TEST_CC" && TEST_CC="$CC"
57
 
if test -n "$TEST_CC" -a -z "$host_alias"; then
58
 
   host_alias="`$TEST_CC -dumpmachine`"
59
 
   if test -z "$build_alias" -a -n "$host_alias"; then
60
 
      build_alias="$host_alias"
61
 
   fi
62
 
fi
63
 
unset TEST_CC
64
 
 
65
 
# checkvm/checkvm.c has no special significance - we just need to pass in a file that
66
 
# helps autoconf verify that it really has found the source tree.
67
 
AC_CONFIG_SRCDIR([checkvm/checkvm.c])
68
 
 
69
 
# Keep the top-level directory tidy by putting auxiliary build tools and local
70
 
# macros in separate subdirectories.
71
 
AC_CONFIG_AUX_DIR([config])
72
 
AC_CONFIG_MACRO_DIR([m4])
73
 
 
74
 
AC_CANONICAL_HOST
75
 
AC_CANONICAL_BUILD
76
 
 
77
 
# Quote the regular expressions
78
 
case "$host_cpu" in
79
 
   [i[3456]86])
80
 
      userSpaceBitness="32"
81
 
      ;;
82
 
   [x86_64])
83
 
      userSpaceBitness="64"
84
 
      ;;
85
 
   [*])
86
 
      AC_MSG_ERROR([Unknown architecture.])
87
 
      ;;
88
 
esac
89
 
 
90
 
# Operational arguments.
91
 
AC_ARG_WITH([root-privileges],
92
 
            [AS_HELP_STRING([--without-root-privileges],
93
 
               [does not perform any operations that require root privileges])],
94
 
            [],
95
 
            [with_root_privileges=yes])
96
 
 
97
 
# Kernel arguments.
98
 
# The kernel args have to go here otherwise the KERNEL_RELEASE won't be visible
99
 
# to getOsVersion()
100
 
AC_ARG_WITH([kernel-modules],
101
 
            [AS_HELP_STRING([--without-kernel-modules],
102
 
                [does not compile or install the kernel modules])],
103
 
            [],
104
 
            [with_kernel_modules=yes])
105
 
 
106
 
AC_ARG_WITH([kernel-release],
107
 
            [AS_HELP_STRING([--with-kernel-release],
108
 
                [specifies the kernel release you want to build against])],
109
 
            [KERNEL_RELEASE="$withval"],
110
 
            [KERNEL_RELEASE=`uname -r`])
111
 
 
112
 
AC_ARG_WITH([linuxdir],
113
 
            [AS_HELP_STRING([--with-linuxdir],
114
 
                [specifies the Linux directory you want to use])],
115
 
            [LINUXDIR="$withval"],
116
 
            [LINUXDIR=/lib/modules/$KERNEL_RELEASE])
117
 
 
118
 
# Turn the uname output into something we can run comparisons on.
119
 
getOsVersion() {
120
 
   major_version="`echo $KERNEL_RELEASE | cut -f1 -d. | cut -f1 -d-`"
121
 
   minor_version="`echo $KERNEL_RELEASE | cut -f2 -d. | cut -f1 -d-`"
122
 
   micro_version="`echo $KERNEL_RELEASE | cut -f3 -d. | cut -f1 -d-`"
123
 
   printf '%02d%02d%03d' $major_version $minor_version $micro_version
124
 
}
125
 
 
126
 
case "$host_os" in
127
 
   [linux*])
128
 
      os="linux"
129
 
      ;;
130
 
   [freebsd*])
131
 
      os="freebsd"
132
 
      ;;
133
 
   [solaris*])
134
 
      os="solaris"
135
 
      ;;
136
 
   [*])
137
 
      AC_MSG_WARN([This is an untested and unsupported Operating System. Proceed at your own peril.])
138
 
      ;;
139
 
esac
140
 
osVersion="`getOsVersion`"
141
 
 
142
 
if test "$with_kernel_modules" = "yes"; then
143
 
   case "$os" in
144
 
      linux)
145
 
         if test "$osVersion" -lt 206009; then
146
 
            AC_MSG_ERROR([Kernels prior to 2.6.9 are not supported in this release of open-vm-tools. Configure using --without-kernel-modules to suppress building kernel drivers.])
147
 
         fi
148
 
         if test ! -d "$LINUXDIR/kernel/"; then
149
 
             AC_MSG_ERROR([$LINUXDIR/kernel does not exist])
150
 
         fi
151
 
         LINUXINCLUDE="$LINUXDIR/build/include"
152
 
         if test ! -d "$LINUXINCLUDE"; then
153
 
            AC_MSG_ERROR([Can't find include dir under $LINUXDIR])
154
 
         fi
155
 
         ;;
156
 
 
157
 
      freebsd)
158
 
         freebsd_sysdir=/usr/src/sys
159
 
         if test -n "$SYSDIR"; then
160
 
            freebsd_sysdir="$SYSDIR"
161
 
         fi
162
 
         if test ! -f "$freebsd_sysdir/conf/kmod.mk"; then
163
 
            AC_MSG_ERROR([FreeBSD kernel tree not found. Please install the kernel sources (or provide the location using SYSDIR) or configure using --without-kernel-modules.])
164
 
         fi
165
 
         ;;
166
 
   esac
167
 
fi
168
 
 
169
 
# Arguments for disabling individual open-vm-tools features or libraries.
170
 
AC_ARG_ENABLE(
171
 
   multimon,
172
 
   AS_HELP_STRING(
173
 
      [--disable-multimon],
174
 
      [disables multimon, enabled by default]),
175
 
   [enable_multimon="$enableval"],
176
 
   [enable_multimon="yes"])
177
 
 
178
 
AC_ARG_WITH(
179
 
   gtk2,
180
 
   AS_HELP_STRING(
181
 
      [--without-gtk2],
182
 
      [compiles without Gtk 2.0]),
183
 
   [with_gtk2="$withval"],
184
 
   [with_gtk2="yes"])
185
 
 
186
 
AC_ARG_WITH(
187
 
   gtkmm,
188
 
   AS_HELP_STRING(
189
 
      [--without-gtkmm],
190
 
      [compiles without Gtkmm, sigc++, and related libs]),
191
 
   [with_gtkmm="$withval"],
192
 
   [with_gtkmm="yes"])
193
 
 
194
 
AC_ARG_ENABLE(
195
 
   docs,
196
 
   AS_HELP_STRING(
197
 
      [--disable-docs],
198
 
      [disables generation of API documentation; by default, docs are built if doxygen is available.]),
199
 
   [enable_docs="$enableval"],
200
 
   [enable_docs="yes"])
201
 
 
202
 
AC_ARG_ENABLE(
203
 
   tests,
204
 
   AS_HELP_STRING(
205
 
      [--disable-tests],
206
 
      [disable compilation of test code.]),
207
 
   [enable_tests="$enableval"],
208
 
   [enable_tests="auto"])
209
 
 
210
 
AM_INIT_AUTOMAKE
211
 
 
212
 
###
213
 
### Constants
214
 
###
215
 
# These need to be declared after initialization.
216
 
 
217
 
# Some of our macro call-sites require changes to
218
 
# CPPFLAGS/CFLAGS/LDFLAGS. In such places, we save the original value
219
 
# of CPPFLAGS/CFLAGS/LDFLAGS before the macro call and restore it when
220
 
# the call is done. We must perform this save at each macro site,
221
 
# because CPPFLAGS/CFLAGS/LDFLAGS may change over the course of
222
 
# configuration.
223
 
#
224
 
# CPPFLAGS is intended for preprocessor options (-D and -I mainly)
225
 
# CFLAGS is intended for compiler options (-O, -f, -W, and so forth)
226
 
 
227
 
CPPFLAGS="$CPPFLAGS -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS"
228
 
 
229
 
###
230
 
### Programs
231
 
###
232
 
# C preprocessor and compiler.
233
 
AC_PROG_CPP
234
 
AC_PROG_CC
235
 
 
236
 
# C++ compiler. Note that unlike AC_PROG_CC, this call does not trigger an
237
 
# error if no C++ compiler was found; it'll just set the variable CXX to 'g++'.
238
 
AC_PROG_CXX
239
 
 
240
 
# This allows features like per-target compiler flags.  I.e., you can compile
241
 
# one copy of the same sources twice with different flags.  (See lib/guestApp
242
 
# for an example.)
243
 
AM_PROG_CC_C_O
244
 
 
245
 
# Needed for the various install and uninstall hooks.
246
 
AC_PROG_INSTALL
247
 
AC_PROG_SED
248
 
AC_PROG_LN_S
249
 
AC_PROG_MKDIR_P
250
 
 
251
 
# Needed for creating the archives in lib/ and the shared libraries.
252
 
AC_PROG_LIBTOOL
253
 
if test "$ac_cv_prog_AR" = false; then
254
 
   AC_MSG_ERROR([The 'ar' utility was not found. Please put ar on the path.])
255
 
fi
256
 
 
257
 
# We use pkg-config to set up the cflags and libs for gtk.
258
 
AC_CHECK_PROG(
259
 
   [HAVE_PKG_CONFIG],
260
 
   [pkg-config],
261
 
   [yes],
262
 
   [no])
263
 
 
264
 
if test "$GCC" != "yes"; then
265
 
   AC_MSG_ERROR([Only GCC is currently supported. Please put gcc in the path.])
266
 
fi
267
 
 
268
 
###
269
 
### Libraries
270
 
###
271
 
 
272
 
AC_PATH_XTRA
273
 
 
274
 
#
275
 
# Check for libintl.h. When configuring using "--without-x", /usr/local/include
276
 
# may not be added to the include path, so code that use glib's i18n functions
277
 
# would fail to compile because it can't find libintl.h.
278
 
#
279
 
AC_CHECK_HEADER([libintl.h],
280
 
                [],
281
 
                [have_libintl=no],
282
 
                [])
283
 
if test "$have_libintl" = "no"; then
284
 
   unset ac_cv_header_libintl_h
285
 
   CPPFLAGS="$CPPFLAGS -I/usr/local/include"
286
 
   AC_CHECK_HEADER([libintl.h],
287
 
                   [],
288
 
                   [AC_MSG_ERROR([libintl.h not found. Make sure you have the gettext headers installed.])],
289
 
                   [])
290
 
fi
291
 
 
292
 
#
293
 
# Check for glib 2.6.0 or greater.
294
 
#
295
 
AC_VMW_CHECK_LIB([glib-2.0],
296
 
                 [GLIB2],
297
 
                 [glib-2.0],
298
 
                 [],
299
 
                 [2.6.0],
300
 
                 [glib.h],
301
 
                 [g_key_file_new],
302
 
                 [],
303
 
                 [AC_MSG_ERROR([glib >= 2.6.0 is required.])])
304
 
AC_VMW_CHECK_LIB([gmodule-2.0],
305
 
                 [GMODULE],
306
 
                 [gmodule-2.0],
307
 
                 [],
308
 
                 [2.6.0],
309
 
                 [],
310
 
                 [],
311
 
                 [],
312
 
                 [AC_MSG_ERROR([gmodule >= 2.6.0 is required.])])
313
 
AC_VMW_CHECK_LIB([gobject-2.0],
314
 
                 [GOBJECT],
315
 
                 [gobject-2.0],
316
 
                 [],
317
 
                 [2.6.0],
318
 
                 [glib-object.h],
319
 
                 [],
320
 
                 [],
321
 
                 [AC_MSG_ERROR([gobject >= 2.6.0 is required.])])
322
 
AC_VMW_CHECK_LIB([gthread-2.0],
323
 
                 [GTHREAD],
324
 
                 [gthread-2.0],
325
 
                 [],
326
 
                 [2.6.0],
327
 
                 [],
328
 
                 [],
329
 
                 [],
330
 
                 [AC_MSG_ERROR([glib >= 2.6.0 is required.])])
331
 
AC_CHECK_PROG([have_genmarshal],
332
 
              [glib-genmarshal],
333
 
              [yes],
334
 
              [no])
335
 
 
336
 
if test "$have_genmarshal" != "yes"; then
337
 
   AC_MSG_ERROR([glib-genmarshal is required; make sure it's available in your path.])
338
 
fi
339
 
 
340
 
#
341
 
# Parts of our Linux code require more recent version of glib
342
 
#
343
 
if test "$os" = "linux"; then
344
 
   AC_VMW_CHECK_LIB([glib-2.0],
345
 
                    [GLIB2],
346
 
                    [glib-2.0],
347
 
                    [],
348
 
                    [2.14.0],
349
 
                    [glib.h],
350
 
                    [g_regex_new],
351
 
                    [have_glib_2_14=yes],
352
 
                    [AC_MSG_WARN([glib is not recent enough, some features will be disabled.])])
353
 
fi
354
 
 
355
 
#
356
 
# Check for fuse.
357
 
#
358
 
AC_VMW_CHECK_LIB([fuse],
359
 
                 [FUSE],
360
 
                 [fuse],
361
 
                 [],
362
 
                 [],
363
 
                 [fuse.h],
364
 
                 [fuse_main],
365
 
                 [have_fuse=yes],
366
 
                 [have_fuse=no;
367
 
                  AC_MSG_WARN([Fuse is missing, vmblock-fuse will be disabled.])])
368
 
 
369
 
#
370
 
# Check for PAM.
371
 
#
372
 
AC_ARG_WITH([pam],
373
 
   [AS_HELP_STRING([--without-pam],
374
 
   [compiles without PAM support.])],
375
 
   [],
376
 
   [with_pam=yes])
377
 
 
378
 
if test "$with_pam" = "yes"; then
379
 
   AC_VMW_DEFAULT_FLAGS([PAM])
380
 
   AC_VMW_CHECK_LIB([pam],
381
 
                    [PAM],
382
 
                    [],
383
 
                    [],
384
 
                    [],
385
 
                    [security/pam_appl.h],
386
 
                    [pam_start],
387
 
                    [PAM_CPPFLAGS="$PAM_CPPFLAGS -DUSE_PAM"],
388
 
                    [AC_VMW_LIB_ERROR([PAM], [pam])])
389
 
fi
390
 
 
391
 
#
392
 
# Check for CUnit and disable test code if not available.
393
 
#
394
 
if test "$enable_tests" = "auto" -o "$enable_tests" = "yes"; then
395
 
   AC_VMW_DEFAULT_FLAGS([CUNIT])
396
 
   AC_VMW_CHECK_LIB([cunit],
397
 
                    [CUNIT],
398
 
                    [],
399
 
                    [],
400
 
                    [],
401
 
                    [CUnit/CUnit.h],
402
 
                    [CU_initialize_registry],
403
 
                    [have_cunit=yes],
404
 
                    [have_cunit=no])
405
 
   if test "$have_cunit" = "no"; then
406
 
      if test "$enable_tests" = "yes"; then
407
 
         AC_VMW_LIB_ERROR([CUNIT], [cunit])
408
 
      else
409
 
         AC_MSG_WARN([CUnit not found, tests won't be compiled.])
410
 
      fi
411
 
   fi
412
 
fi
413
 
 
414
 
# If the user explicitly disables X11, then don't try to detect the X-related libraries
415
 
if test "$have_x" = "disabled"; then
416
 
   enable_multimon="no"
417
 
elif test "$have_x" != "yes"; then
418
 
   AC_MSG_ERROR(
419
 
      [The X11 libraries were not found. Please configure without X11 (using --without-x), or install the libX11 devel package(s).])
420
 
else
421
 
   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
422
 
   COMMON_XLIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
423
 
 
424
 
   AC_CHECK_LIB(
425
 
      [Xext],
426
 
      [XeviQueryVersion],
427
 
      [COMMON_XLIBS="-lXext $COMMON_XLIBS"],
428
 
      [AC_MSG_ERROR(
429
 
         [libXext not found. Please configure without X11 (using --without-x), or install the libXext devel package(s).])],
430
 
      [$COMMON_XLIBS])
431
 
 
432
 
   AC_CHECK_HEADER(
433
 
      [X11/extensions/extutil.h],
434
 
      [],
435
 
      [AC_MSG_ERROR(
436
 
         [X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x).])],
437
 
      [#include <X11/Xlib.h>
438
 
       #include <X11/Xproto.h>])
439
 
 
440
 
   if test "$enable_multimon" != "no"; then
441
 
      AC_CHECK_LIB(
442
 
         [Xinerama],
443
 
         [XineramaQueryVersion],
444
 
         [COMMON_XLIBS="-lXinerama $COMMON_XLIBS"],
445
 
         [AC_MSG_ERROR(
446
 
            [libXinerama not found. Please configure without multimon (using --disable-multimon), configure without X11 (using --without-x), or install the libXinerama devel package(s).])],
447
 
         [$COMMON_XLIBS])
448
 
   fi
449
 
 
450
 
   AC_CHECK_LIB(
451
 
      [Xi],
452
 
      [XOpenDevice],
453
 
      [COMMON_XLIBS="-lXi $COMMON_XLIBS"],
454
 
      [AC_MSG_ERROR(
455
 
         [libXi not found. Please configure without X11 (using --without-x), or install the libXi devel package(s).])],
456
 
      [$COMMON_XLIBS])
457
 
 
458
 
   AC_CHECK_LIB(
459
 
      [Xrender],
460
 
      [XRenderQueryVersion],
461
 
      [COMMON_XLIBS="-lXrender $COMMON_XLIBS"],
462
 
      [AC_MSG_ERROR(
463
 
         [libXrender not found. Please configure without X11 (using --without-x), or install the libXrender devel package(s).])],
464
 
      [$COMMON_XLIBS])
465
 
 
466
 
   AC_CHECK_LIB(
467
 
      [Xrandr],
468
 
      [XRRQueryVersion],
469
 
      [COMMON_XLIBS="-lXrandr $COMMON_XLIBS"],
470
 
      [AC_MSG_ERROR(
471
 
         [libXrandr not found. Please configure without X11 (using --without-x) or install the libXrandr devel package(s).])],
472
 
      [$COMMON_XLIBS])
473
 
 
474
 
   AC_CHECK_LIB(
475
 
      [Xtst],
476
 
      [XTestQueryExtension],
477
 
      [COMMON_XLIBS="-lXtst $COMMON_XLIBS"],
478
 
      [AC_MSG_ERROR(
479
 
         [libXtst not found. Please configure without X11 (using --without-x) or install the libXtst devel package(s).])],
480
 
      [$COMMON_XLIBS])
481
 
 
482
 
   AC_CHECK_LIB(
483
 
      [SM],
484
 
      [SmcOpenConnection],
485
 
      [XSM_LIBS="-lSM -lICE" && have_xsm_lib="yes"],
486
 
      []
487
 
      [-lICE])
488
 
 
489
 
   AC_CHECK_HEADERS([X11/SM/SMlib.h X11/ICE/ICElib.h],
490
 
                    [have_xsm_header="yes"],
491
 
                    [],
492
 
                    [])
493
 
   if test "$have_xsm_lib" = "yes" -a "$have_xsm_header" = "yes"; then
494
 
      have_xsm="yes"
495
 
   fi
496
 
 
497
 
   AC_CHECK_LIB(
498
 
      [Xcomposite],
499
 
      [XCompositeQueryExtension],
500
 
      [XCOMPOSITE_LIBS="-lXcomposite"],
501
 
      [have_xcomposite="no"]
502
 
      [])
503
 
   AC_CHECK_HEADERS([X11/extensions/Xcomposite.h],
504
 
                    [],
505
 
                    [have_xcomposite="no"],
506
 
                    [])
507
 
   if test "$have_xcomposite" != "no"; then
508
 
      have_xcomposite="yes"
509
 
   fi
510
 
 
511
 
   # Check whether we have gtk+ 2.0.
512
 
   if test "$with_gtk2" != "no"; then
513
 
      # gdk_display_get_default_group (added in gtk+ 2.4.0) is function currently
514
 
      # needed by vmware-user.
515
 
      AC_VMW_CHECK_LIB([gtk-x11-2.0],
516
 
                       [GTK],
517
 
                       [gtk+-2.0],
518
 
                       [],
519
 
                       [2.4.0],
520
 
                       [gtk/gtk.h],
521
 
                       [gdk_display_get_default_group],
522
 
                       [GTK_CPPFLAGS="$GTK_CPPFLAGS -DGTK2"],
523
 
                       [AC_MSG_ERROR([Gtk+ 2.0 library not found or too old. Please configure without Gtk+ support (using --without-gtk2) or install the Gtk+ 2.0 devel package.])])
524
 
   fi
525
 
 
526
 
   #
527
 
   # Check for gtkmm 2.4.0 or greater.
528
 
   #
529
 
 
530
 
   if test "$with_gtkmm" != "no"; then
531
 
      CUSTOM_GTKMM_CPPFLAGS="$CUSTOM_GTKMM_CPPFLAGS $GTK_CPPFLAGS"
532
 
      AC_VMW_CHECK_LIBXX([gtkmm-2.4],
533
 
                         [GTKMM],
534
 
                         [gtkmm-2.4],
535
 
                         [],
536
 
                         [2.4.0],
537
 
                         [gtkmm.h],
538
 
                         [],
539
 
                         [GTKMM_CPPFLAGS="$GTKMM_CPPFLAGS -DHAVE_GTKMM"],
540
 
                         [AC_MSG_ERROR([gtkmm library not found. Please install the libgtkmm devel package(s), or re-configure using --without-gtkmm.])])
541
 
   fi
542
 
fi # End of checks for X libraries
543
 
 
544
 
AC_CHECK_LIB(
545
 
   [crypt],
546
 
   [crypt],
547
 
   [HAVE_CRYPT="yes"],
548
 
   [AC_MSG_ERROR(
549
 
      [libcrypt not found. Please install the libc/libcrypt devel package(s).])])
550
 
 
551
 
AC_CHECK_FUNCS(
552
 
   dlopen,
553
 
   ,
554
 
   [AC_CHECK_LIB(
555
 
      dl,
556
 
      dlopen,
557
 
      [VIX_LIBADD="$VIX_LIBADD -ldl"
558
 
       LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -ldl"],
559
 
      [AC_MSG_ERROR(
560
 
         [dlopen was not found, but is required for open-vm-tools to function properly. Please contact your OS vendor.])])])
561
 
 
562
 
AC_CHECK_FUNCS([ecvt])
563
 
AC_CHECK_FUNCS([fcvt])
564
 
 
565
 
if test "$os" = "freebsd" -a "$osVersion" -ge 600000; then
566
 
   AC_CHECK_LIB(
567
 
      [thr],
568
 
      [pthread_mutex_init],
569
 
      [THREAD_LIB=-lthr],
570
 
      [AC_MSG_ERROR(
571
 
         [Unable to locate required threading library libthr.])])
572
 
else
573
 
   AC_CHECK_LIB(
574
 
      [pthread],
575
 
      [pthread_mutex_init],
576
 
      [THREAD_LIB=-lpthread],
577
 
      [AC_MSG_ERROR(
578
 
         [libpthread not found. Please install the libc/libpthread devel package(s).])])
579
 
fi
580
 
 
581
 
# PAM prefix
582
 
AC_ARG_WITH([pam-prefix],
583
 
            [AS_HELP_STRING([--with-pam-prefix],
584
 
                [specifies where pam files go. Default is $(sysconfdir)])],
585
 
            [PAM_PREFIX="$withval"],
586
 
            [PAM_PREFIX='$(sysconfdir)'])
587
 
 
588
 
if test "$os" = "linux"; then
589
 
        AC_ARG_WITH([procps],
590
 
            [AS_HELP_STRING([--without-procps],
591
 
                [compiles without libproc (disables support for meminfo)])],
592
 
            [],
593
 
            [with_procps=yes])
594
 
else
595
 
        with_procps="no"
596
 
fi
597
 
 
598
 
if test "$with_procps" = "yes"; then
599
 
   if test -z "$CUSTOM_PROCPS_NAME"; then
600
 
      CUSTOM_PROCPS_NAME=proc
601
 
   fi
602
 
 
603
 
   # XXX: no pkg-config and no procps-config means we need to
604
 
   # hard-code a sensible default.
605
 
   if test -z "$CUSTOM_PROCPS_LIBS"; then
606
 
      CUSTOM_PROCPS_LIBS="-L/lib"
607
 
   fi
608
 
 
609
 
   # Some distros provide libproc-${version}.so only, others provide the
610
 
   # libproc.so symlink. Try both to see what sticks (but only try the 3.2.7
611
 
   # and 3.2.8 versions - adding every possible version here would be a mess).
612
 
   #
613
 
   # Users can help by providing CUSTOM_PROCPS_NAME / CUSTOM_PROCPS_LIBS if
614
 
   # necessary.
615
 
   have_procps=no
616
 
 
617
 
   AC_VMW_CHECK_LIB([$CUSTOM_PROCPS_NAME],
618
 
                    [PROCPS],
619
 
                    [],
620
 
                    [],
621
 
                    [],
622
 
                    [],
623
 
                    [getstat],
624
 
                    [
625
 
                     have_procps=yes;
626
 
                    ],
627
 
                    [])
628
 
 
629
 
   if test "$have_procps" = "no"; then
630
 
      AC_VMW_CHECK_LIB([proc-3.2.8],
631
 
                       [PROCPS],
632
 
                       [],
633
 
                       [],
634
 
                       [],
635
 
                       [],
636
 
                       [getstat],
637
 
                       [
638
 
                        have_procps=yes;
639
 
                       ],
640
 
                       [])
641
 
   fi
642
 
 
643
 
   if test "$have_procps" = "no"; then
644
 
      AC_VMW_CHECK_LIB([proc-3.2.7],
645
 
                       [PROCPS],
646
 
                       [],
647
 
                       [],
648
 
                       [],
649
 
                       [],
650
 
                       [getstat],
651
 
                       [],
652
 
                       [AC_MSG_ERROR([libproc not found. Please configure without procps (using --without-procps) or install procps - http://procps.sourceforge.net])])
653
 
   fi
654
 
fi
655
 
 
656
 
if test "$with_procps" != "yes"; then
657
 
AC_DEFINE([NO_PROCPS], 1, [Define to 1 if building without procps.])
658
 
fi
659
 
 
660
 
AC_ARG_WITH([dnet],
661
 
            [AS_HELP_STRING([--without-dnet],
662
 
            [compiles without libdnet (disables support for nicinfo)])],
663
 
            [],
664
 
            [with_dnet=yes])
665
 
 
666
 
have_dnet="no"
667
 
if test "$with_dnet" = "yes"; then
668
 
        # On Debian, dnet is installed via the libdumbnet package. We need to
669
 
        # detect this so that our source files include dumbnet.h instead of
670
 
        # dnet.h, which is part of a different package altogether.
671
 
   AC_VMW_CHECK_LIB([dumbnet],
672
 
                    [DNET],
673
 
                    [],
674
 
                    [dumbnet-config],
675
 
                    [],
676
 
                    [dumbnet.h],
677
 
                    [intf_open],
678
 
                    [have_dnet="yes";
679
 
                     AC_DEFINE([DNET_IS_DUMBNET], 1, [Define to 1 if substituting Debian's libdumbnet for libdnet.])],
680
 
                    [])
681
 
 
682
 
   if test $have_dnet = "no"; then
683
 
      AC_VMW_CHECK_LIB([dnet],
684
 
                       [DNET],
685
 
                       [],
686
 
                       [dnet-config],
687
 
                       [],
688
 
                       [dnet.h],
689
 
                       [intf_open],
690
 
                       [have_dnet="yes"],
691
 
                       [])
692
 
   fi
693
 
 
694
 
   if test $have_dnet = "no"; then
695
 
                AC_MSG_ERROR(
696
 
                   [dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net])
697
 
        fi
698
 
fi
699
 
 
700
 
if test "$with_dnet" != "yes"; then
701
 
AC_DEFINE([NO_DNET], 1, [Define to 1 if building without libdnet.])
702
 
fi
703
 
 
704
 
AC_ARG_WITH([icu],
705
 
            [AS_HELP_STRING([--without-icu],
706
 
              [disables support for ICU])],
707
 
            [],
708
 
            [with_icu=yes])
709
 
 
710
 
if test "$have_x" = "yes" -o "$with_icu" = "yes"; then
711
 
   AC_CHECK_TOOL([have_cxx], [$CXX], [no])
712
 
   if test "$have_cxx" = "no"; then
713
 
      AC_MSG_ERROR([C++ compiler not found. Make sure you have a C++ compiler installed or configure without X11 (using --without-x) and without ICU (using --without-icu).])
714
 
   fi
715
 
fi
716
 
 
717
 
if test "$with_icu" = "yes"; then
718
 
   AC_VMW_CHECK_LIBXX([icuuc],
719
 
                      [ICU],
720
 
                      [],
721
 
                      [icu-config],
722
 
                      [],
723
 
                      [unicode/utf.h],
724
 
                      [],
725
 
                      [ICU_CPPFLAGS="$ICU_CPPFLAGS -DUSE_ICU"],
726
 
                      [AC_MSG_ERROR([ICU library not found. Please configure without ICU (using --without-icu) or install ICU - http://www.icu-project.org])])
727
 
   # Check whether we have ICU >= 3.8.
728
 
   AC_LANG_PUSH([C++])
729
 
   AC_MSG_CHECKING([for ucasemap_utf8ToTitle in ICU])
730
 
   ORIGINAL_CPPFLAGS="$CPPFLAGS"
731
 
   CPPFLAGS="$CPPFLAGS $ICU_CPPFLAGS"
732
 
   AC_TRY_COMPILE([#include <unicode/ucasemap.h>],
733
 
                  [
734
 
                     (void) &ucasemap_utf8ToTitle;
735
 
                     return 0;
736
 
                  ],
737
 
                  [
738
 
                     ICU_CPPFLAGS="$ICU_CPPFLAGS -DHAVE_ICU_38"
739
 
                     AC_MSG_RESULT([yes])
740
 
                  ],
741
 
                  [AC_MSG_RESULT([no])])
742
 
   CPPFLAGS="$ORIGINAL_CPPFLAGS"
743
 
   AC_LANG_POP([C++])
744
 
 
745
 
   # Easier to give all modules the ICU defines/includes...
746
 
   CPPFLAGS="$CPPFLAGS $ICU_CPPFLAGS"
747
 
else
748
 
   CPPFLAGS="$CPPFLAGS -DNO_ICU"
749
 
fi
750
 
 
751
 
AC_PATH_PROG(
752
 
   [RPCGEN],
753
 
   [rpcgen],
754
 
   [ AC_MSG_ERROR([rpcgen not found. Please install the libc devel package.]) ])
755
 
 
756
 
###
757
 
### Headers
758
 
###
759
 
 
760
 
AC_CHECK_HEADERS([crypt.h])
761
 
AC_CHECK_HEADERS([inttypes.h])
762
 
AC_CHECK_HEADERS([stdint.h])
763
 
AC_CHECK_HEADERS([stdlib.h])
764
 
AC_CHECK_HEADERS([wchar.h])
765
 
AC_CHECK_HEADERS([sys/inttypes.h])
766
 
AC_CHECK_HEADERS([sys/io.h])
767
 
AC_CHECK_HEADERS([sys/param.h]) # Required to make the sys/user.h check work correctly on FreeBSD
768
 
AC_CHECK_HEADERS([sys/sysinfo.h])
769
 
AC_CHECK_HEADERS([sys/types.h])
770
 
AC_CHECK_HEADERS([sys/user.h],
771
 
   [],
772
 
   [],
773
 
   [
774
 
#ifdef HAVE_SYS_PARAM_H
775
 
#   include <sys/param.h>
776
 
#endif
777
 
   ])
778
 
AC_CHECK_HEADERS([sys/vfs.h])
779
 
AC_CHECK_HEADERS([syslimits.h])
780
 
AC_CHECK_HEADERS([unwind.h])
781
 
 
782
 
AC_CHECK_HEADER(
783
 
   [wchar.h],
784
 
   [HAVE_WCHAR_H="yes"],
785
 
   [HAVE_WCHAR_H="no"])
786
 
 
787
 
if test "$os" = "linux"; then
788
 
   # Make sure kernel-headers package is installed.
789
 
   AC_CHECK_HEADER(
790
 
      [linux/unistd.h],
791
 
      [],
792
 
      [AC_MSG_ERROR(linux/unistd.h is not found. Please install kernel-headers/linux-userspace-headers/linux-libc-dev package.)])
793
 
fi
794
 
 
795
 
if test "$enable_multimon" != "no"; then
796
 
   AC_CHECK_HEADER(
797
 
      [X11/extensions/panoramiXproto.h],
798
 
      [],
799
 
      [AC_MSG_ERROR(
800
 
         [panoramiXproto.h not found. Please configure without multimon (using --disable-multimon) or install the libXinerama devel package(s).])],
801
 
      [#include <X11/X.h>
802
 
       #include <X11/Xmd.h>])
803
 
fi
804
 
 
805
 
bsdPrintfWrappers=no
806
 
if test "$os" = "linux"; then
807
 
   AC_CHECK_LIB([c],
808
 
                [ecvt],
809
 
                [bsdPrintfWrappers=yes],
810
 
                [])
811
 
fi
812
 
 
813
 
###
814
 
### Typdefs, structs, and compiler quarks.
815
 
###
816
 
AC_HEADER_STDBOOL
817
 
AC_C_CONST
818
 
AC_TYPE_UID_T
819
 
AC_C_INLINE
820
 
AC_TYPE_MODE_T
821
 
AC_TYPE_OFF_T
822
 
AC_TYPE_PID_T
823
 
AC_TYPE_SIZE_T
824
 
AC_CHECK_MEMBERS([struct stat.st_rdev])
825
 
AC_HEADER_TIME
826
 
AC_STRUCT_TM
827
 
AC_C_VOLATILE
828
 
 
829
 
###
830
 
### Specific features and OS/arch flags / actions
831
 
###
832
 
 
833
 
### General flags / actions
834
 
CFLAGS="$CFLAGS -Wall"
835
 
CFLAGS="$CFLAGS -Werror"
836
 
 
837
 
# -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident' in Xlib.h on OpenSolaris.
838
 
for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \
839
 
    -Wno-unknown-pragmas -Wno-uninitialized; do
840
 
    AC_MSG_CHECKING([for GCC flag $TEST_CFLAG])
841
 
    ORIGINAL_CFLAGS="$CFLAGS"
842
 
    CFLAGS="$CFLAGS $TEST_CFLAG"
843
 
    NEW_CFLAG=""
844
 
    AC_TRY_COMPILE(
845
 
       [],
846
 
       [
847
 
        return 0;
848
 
       ],
849
 
   [NEW_CFLAG=" $TEST_CFLAG"
850
 
    AC_MSG_RESULT(yes)],
851
 
   [AC_MSG_RESULT(no)])
852
 
   CFLAGS="$ORIGINAL_CFLAGS$NEW_CFLAG"
853
 
done
854
 
CPPFLAGS="$CPPFLAGS -DVMX86_TOOLS"
855
 
CPPFLAGS="$CPPFLAGS"
856
 
 
857
 
# -fvisibility is used by "core service" plugins, but not required.
858
 
ORIGINAL_CFLAGS="$CFLAGS"
859
 
CFLAGS="$CFLAGS -fvisibility=hidden"
860
 
AC_MSG_CHECKING([for GCC flag -fvisibility])
861
 
AC_TRY_COMPILE([],
862
 
               [return 0;],
863
 
               [PLUGIN_CPPFLAGS="-fvisibility=hidden -DGCC_EXPLICIT_EXPORT";
864
 
                AC_MSG_RESULT(yes)],
865
 
               [AC_MSG_RESULT(no)])
866
 
CFLAGS="$ORIGINAL_CFLAGS"
867
 
 
868
 
# Detect "unused-but-set-variable" gcc warning and disable it.
869
 
ORIGINAL_CFLAGS="$CFLAGS"
870
 
CFLAGS="$CFLAGS -Wno-unused-but-set-variable"
871
 
AC_MSG_CHECKING([for GCC flag -Wno-unused-but-set-variable])
872
 
AC_TRY_COMPILE([],
873
 
               [return 0;],
874
 
               [ORIGINAL_CFLAGS="$ORIGINAL_CFLAGS -Wno-unused-but-set-variable";
875
 
                AC_MSG_RESULT(yes)],
876
 
               [AC_MSG_RESULT(no)])
877
 
CFLAGS="$ORIGINAL_CFLAGS"
878
 
 
879
 
 
880
 
BUILDDIR="`pwd`"
881
 
 
882
 
INCLUDE_DIR="`cd $srcdir; pwd`/lib/include"
883
 
BLD_INCLUDE_DIR="$BUILDDIR/lib/include"
884
 
CPPFLAGS="-I$INCLUDE_DIR -I$BLD_INCLUDE_DIR $CPPFLAGS"
885
 
 
886
 
###
887
 
### Documentation.
888
 
###
889
 
 
890
 
if test "$enable_docs" = "yes"; then
891
 
   AC_CHECK_PROG([have_doxygen],
892
 
                 [doxygen],
893
 
                 [yes],
894
 
                 [no])
895
 
   if test "$have_doxygen" = "no"; then
896
 
      AC_MSG_WARN([doxygen not found; API documentation will not be generated.])
897
 
   else
898
 
      AC_PATH_PROG([DOT], [dot], [])
899
 
      if test "$DOT" = ""; then
900
 
         HAVE_DOT=NO
901
 
      else
902
 
         DOT=`dirname $DOT`
903
 
         HAVE_DOT=YES
904
 
      fi
905
 
      AC_SUBST([DOT])
906
 
      AC_SUBST([HAVE_DOT])
907
 
 
908
 
      AC_PATH_PROG([MSCGEN],
909
 
                   [mscgen],
910
 
                   [no])
911
 
      if test "$MSCGEN" != "no"; then
912
 
         MSCGEN_DIR="`dirname $MSCGEN`"
913
 
      else
914
 
         MSCGEN_DIR=
915
 
      fi
916
 
      AC_SUBST([MSCGEN_DIR])
917
 
   fi
918
 
fi
919
 
 
920
 
###
921
 
### OS/arch-specific flags / actions
922
 
###
923
 
 
924
 
MODULES=""
925
 
MODULES_OS="$os"
926
 
TARGET_OS="$os"
927
 
MODULES_DIR=""
928
 
buildHgfsmounter=no
929
 
 
930
 
if test "$have_glib_2_14" = "yes"; then
931
 
   CPPFLAGS="$CPPFLAGS -DHAVE_GLIB_REGEX"
932
 
fi
933
 
 
934
 
if test "$os" = "linux"; then
935
 
   MODULES_DIR="$LINUXDIR/kernel/"
936
 
 
937
 
   CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
938
 
   CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
939
 
   CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
940
 
   CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE"
941
 
   CPPFLAGS="$CPPFLAGS -D_SVID_SOURCE"
942
 
 
943
 
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrt"
944
 
 
945
 
   MODULES="$MODULES vmsync vmci vsock"
946
 
   MODULES="$MODULES vmxnet vmhgfs"
947
 
   if test "$osVersion" -lt 300000; then
948
 
       MODULES="$MODULES vmblock vmsync"
949
 
   fi
950
 
 
951
 
   buildHgfsmounter=yes
952
 
fi
953
 
 
954
 
if test "$os" = "freebsd"; then
955
 
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lkvm"
956
 
   MODULES_DIR="/boot/modules"
957
 
 
958
 
   if test "$osVersion" -ge 302000; then
959
 
      MODULES="$MODULES vmmemctl"
960
 
   fi
961
 
   if test "$osVersion" -ge 409000; then
962
 
      MODULES="$MODULES vmxnet"
963
 
   fi
964
 
   if test "$osVersion" -ge 600000; then
965
 
      MODULES="$MODULES vmblock vmhgfs"
966
 
      buildHgfsmounter=yes
967
 
   fi
968
 
 
969
 
   if test "$with_kernel_modules" = "yes"; then
970
 
      echo "****************************************************************"
971
 
      echo "   You are building FreeBSD kernel modules. Make sure you use   "
972
 
      echo "   'make' to build open-vm-tools, and not GNU make ('gmake').   "
973
 
      echo "****************************************************************"
974
 
   fi
975
 
fi
976
 
 
977
 
if test "$os" = "solaris"; then
978
 
   LIB_IMPERSONATE_CPPFLAGS="$LIB_IMPERSONATE_CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
979
 
   LIB_USER_CPPFLAGS="$LIB_USER_CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
980
 
 
981
 
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lsocket"
982
 
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lnsl"
983
 
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lresolv"
984
 
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrpcsvc"
985
 
 
986
 
   # Setup defines to identify the OS version.
987
 
   if test "$osVersion" -eq 509000; then
988
 
      CPPFLAGS="$CPPFLAGS -DSOL9"
989
 
   fi
990
 
   if test "$osVersion" -eq 510000; then
991
 
      CPPFLAGS="$CPPFLAGS -DSOL10"
992
 
   fi
993
 
   if test "$osVersion" -eq 511000; then
994
 
      CPPFLAGS="$CPPFLAGS -DSOL11"
995
 
   fi
996
 
 
997
 
   MODULES="$MODULES vmxnet vmmemctl"
998
 
 
999
 
   # HGFS and vmblock need Solaris 10 at least.
1000
 
   if test "$osVersion" -ge 510000; then
1001
 
      MODULES="$MODULES vmhgfs vmblock"
1002
 
   fi
1003
 
 
1004
 
   # vmxnet3 is built on Solaris 10 / 11 only if GLDv3 is installed.
1005
 
   if test "$osVersion" -gt 510000; then
1006
 
      AC_CHECK_HEADER(
1007
 
         [sys/mac.h],
1008
 
         [MODULES="$MODULES vmxnet3"],
1009
 
         [AC_MSG_WARN([GLDv3 (sys/mac.h) is not installed, vmxnet3 will not be compiled.])])
1010
 
   fi
1011
 
 
1012
 
   if test "$with_kernel_modules" = "yes"; then
1013
 
      echo "****************************************************************"
1014
 
      echo "   You are building Solaris kernel modules. Make sure you use   "
1015
 
      echo "   GNU make to build open-vm-tools.                             "
1016
 
      echo "****************************************************************"
1017
 
   fi
1018
 
fi
1019
 
 
1020
 
AM_CONDITIONAL(BUILD_HGFSMOUNTER, test "$buildHgfsmounter" = "yes")
1021
 
AM_CONDITIONAL(LINUX, test "$os" = "linux")
1022
 
AM_CONDITIONAL(SOLARIS, test "$os" = "solaris")
1023
 
AM_CONDITIONAL(FREEBSD, test "$os" = "freebsd")
1024
 
AM_CONDITIONAL(FREEBSD_CUSTOM_SYSDIR, test "$os" = "freebsd" -a -n "$SYSDIR")
1025
 
AM_CONDITIONAL(THIRTY_TWO_BIT_USERSPACE, test "$userSpaceBitness" = "32")
1026
 
AM_CONDITIONAL(HAVE_X11, test "$have_x" = "yes")
1027
 
AM_CONDITIONAL(HAVE_ICU, test "$with_icu" = "yes")
1028
 
AM_CONDITIONAL(WITH_KERNEL_MODULES, test "$with_kernel_modules" = "yes")
1029
 
AM_CONDITIONAL(HAVE_XSM, test "$have_xsm" = "yes")
1030
 
AM_CONDITIONAL(HAVE_XCOMPOSITE, test "$have_xcomposite" = "yes")
1031
 
AM_CONDITIONAL(ENABLE_TESTS, test "$have_cunit" = "yes")
1032
 
AM_CONDITIONAL(WITH_ROOT_PRIVILEGES, test "$with_root_privileges" = "yes")
1033
 
AM_CONDITIONAL(HAVE_DNET, test "$have_dnet" = "yes")
1034
 
AM_CONDITIONAL(HAVE_DOXYGEN, test "$have_doxygen" = "yes")
1035
 
AM_CONDITIONAL(HAVE_FUSE, test "$have_fuse" = "yes")
1036
 
AM_CONDITIONAL(HAVE_GNU_LD, test "$with_gnu_ld" = "yes")
1037
 
AM_CONDITIONAL(HAVE_GTKMM, test "$have_x" = "yes" -a "$with_gtkmm" = "yes")
1038
 
AM_CONDITIONAL(HAVE_PAM, test "$with_pam" = "yes")
1039
 
AM_CONDITIONAL(USE_SLASH_PROC, test "os" = "linux" -a "$have_glib_2_14" = "yes")
1040
 
AM_CONDITIONAL(USE_PRINTF_WRAPPERS, test "$bsdPrintfWrappers" = "yes")
1041
 
 
1042
 
if test "$have_xsm" != "yes"; then
1043
 
AC_DEFINE([NO_XSM], 1, [])
1044
 
fi
1045
 
 
1046
 
if test "$have_xcomposite" != "yes"; then
1047
 
   AC_DEFINE([NO_XCOMPOSITE])
1048
 
fi
1049
 
 
1050
 
### Feature-specific flags / actions
1051
 
# Combine where possible
1052
 
 
1053
 
# If control reaches this point and multimon is still enabled, then we know
1054
 
# all of the tests for required components have passed and it's safe to allow
1055
 
# multimon. Otherwise, it should be disabled.
1056
 
if test "$enable_multimon" = "no"; then
1057
 
   # XXX: For consistency, change this to ENABLE_MULTIMON. This will require
1058
 
   # some additional code cleanup.
1059
 
   AC_DEFINE([NO_MULTIMON], 1, [Define to 1 if building without multimon support.])
1060
 
fi
1061
 
 
1062
 
LIB_AUTH_CPPFLAGS="$LIB_AUTH_CPPFLAGS $PAM_CPPFLAGS"
1063
 
if test "$HAVE_CRYPT" = "yes"; then
1064
 
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lcrypt"
1065
 
   VIX_LIBADD="$VIX_LIBADD -lcrypt"
1066
 
fi
1067
 
 
1068
 
 
1069
 
LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD $THREAD_LIB"
1070
 
VIX_LIBADD="$VIX_LIBADD $THREAD_LIB"
1071
 
 
1072
 
### Core Services definitions.
1073
 
 
1074
 
HGFS_LIBS="$BUILDDIR/libhgfs/libhgfs.la"
1075
 
 
1076
 
VMTOOLS_LIBS="$BUILDDIR/libvmtools/libvmtools.la $GLIB2_LIBS"
1077
 
VMTOOLS_CPPFLAGS="-DVMTOOLS_USE_GLIB $GLIB2_CPPFLAGS"
1078
 
 
1079
 
PLUGIN_CPPFLAGS="$VMTOOLS_CPPFLAGS $PLUGIN_CPPFLAGS"
1080
 
PLUGIN_LDFLAGS="-Wl,-z,defs -Wl,-lc -shared -module -avoid-version"
1081
 
 
1082
 
# In Solaris, the XDR-related functions are not in libc like in Linux and
1083
 
# FreeBSD, so binaries need to be linked to some extra libraries.
1084
 
XDR_LIBS=
1085
 
if test "$os" = "solaris"; then
1086
 
   XDR_LIBS="-lnsl -lrpcsvc"
1087
 
fi
1088
 
 
1089
 
# Installation directories for core services plugins.
1090
 
TEST_PLUGIN_INSTALLDIR=$datadir/open-vm-tools/tests
1091
 
COMMON_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/common
1092
 
VMSVC_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmsvc
1093
 
VMUSR_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmusr
1094
 
 
1095
 
# General definitions
1096
 
INSTVMSG='$(SHELL) $(top_srcdir)/scripts/build/instvmsg.sh'
1097
 
RPCGEN_WRAPPER='$(SHELL) $(top_builddir)/scripts/build/rpcgen_wrapper.sh'
1098
 
 
1099
 
### General substs
1100
 
 
1101
 
AC_SUBST([HGFS_LIBS])
1102
 
AC_SUBST([TOOLS_VERSION])
1103
 
AC_SUBST([TARGET_OS])
1104
 
AC_SUBST([KERNEL_RELEASE])
1105
 
AC_SUBST([LINUXINCLUDE])
1106
 
AC_SUBST([MODULES_OS])
1107
 
AC_SUBST([MODULES_DIR])
1108
 
AC_SUBST([MODULES])
1109
 
AC_SUBST([COMMON_XLIBS])
1110
 
AC_SUBST([XSM_LIBS])
1111
 
AC_SUBST([XCOMPOSITE_LIBS])
1112
 
AC_SUBST([PAM_PREFIX])
1113
 
AC_SUBST([PLUGIN_CPPFLAGS])
1114
 
AC_SUBST([PLUGIN_LDFLAGS])
1115
 
AC_SUBST([VMTOOLS_CPPFLAGS])
1116
 
AC_SUBST([VMTOOLS_LIBS])
1117
 
AC_SUBST([RPCGENFLAGS])
1118
 
AC_SUBST([XDR_LIBS])
1119
 
AC_SUBST([TEST_PLUGIN_INSTALLDIR])
1120
 
AC_SUBST([COMMON_PLUGIN_INSTALLDIR])
1121
 
AC_SUBST([VMSVC_PLUGIN_INSTALLDIR])
1122
 
AC_SUBST([VMUSR_PLUGIN_INSTALLDIR])
1123
 
if test "$os" = "freebsd" -a -n "$SYSDIR"; then
1124
 
   # If SYSDIR is not defined, AC_SUBST expands to nothing, so we need something
1125
 
   # inside this block.
1126
 
   true
1127
 
   AC_SUBST([SYSDIR])
1128
 
fi
1129
 
AC_SUBST([INSTVMSG])
1130
 
AC_SUBST([RPCGEN_WRAPPER])
1131
 
 
1132
 
### Lib substs
1133
 
 
1134
 
AC_SUBST([LIB_AUTH_CPPFLAGS])
1135
 
AC_SUBST([LIB_IMPERSONATE_CPPFLAGS])
1136
 
AC_SUBST([LIB_USER_CPPFLAGS])
1137
 
AC_SUBST([LIBVMTOOLS_LIBADD])
1138
 
 
1139
 
### Program substs
1140
 
 
1141
 
AC_SUBST([VIX_LIBADD])
1142
 
 
1143
 
###
1144
 
### Create the Makefiles
1145
 
###
1146
 
AC_CONFIG_FILES([                      \
1147
 
   Makefile                            \
1148
 
   lib/Makefile                        \
1149
 
   lib/appUtil/Makefile                \
1150
 
   lib/auth/Makefile                   \
1151
 
   lib/backdoor/Makefile               \
1152
 
   lib/dict/Makefile                   \
1153
 
   lib/dynxdr/Makefile                 \
1154
 
   lib/err/Makefile                    \
1155
 
   lib/file/Makefile                   \
1156
 
   lib/foundryMsg/Makefile             \
1157
 
   lib/glibUtils/Makefile              \
1158
 
   lib/guestApp/Makefile               \
1159
 
   lib/guestRpc/Makefile               \
1160
 
   lib/hgfs/Makefile                   \
1161
 
   lib/hgfsBd/Makefile                 \
1162
 
   lib/hgfsHelper/Makefile             \
1163
 
   lib/hgfsServer/Makefile             \
1164
 
   lib/hgfsServerManagerGuest/Makefile \
1165
 
   lib/hgfsServerPolicyGuest/Makefile  \
1166
 
   lib/impersonate/Makefile            \
1167
 
   lib/lock/Makefile                   \
1168
 
   lib/message/Makefile                \
1169
 
   lib/misc/Makefile                   \
1170
 
   lib/netUtil/Makefile                \
1171
 
   lib/panic/Makefile                  \
1172
 
   lib/panicDefault/Makefile           \
1173
 
   lib/printer/Makefile                \
1174
 
   lib/procMgr/Makefile                \
1175
 
   lib/rpcChannel/Makefile             \
1176
 
   lib/rpcIn/Makefile                  \
1177
 
   lib/rpcOut/Makefile                 \
1178
 
   lib/rpcVmx/Makefile                 \
1179
 
   lib/slashProc/Makefile              \
1180
 
   lib/string/Makefile                 \
1181
 
   lib/stubs/Makefile                  \
1182
 
   lib/syncDriver/Makefile             \
1183
 
   lib/system/Makefile                 \
1184
 
   lib/unicode/Makefile                \
1185
 
   lib/user/Makefile                   \
1186
 
   lib/vmCheck/Makefile                \
1187
 
   lib/vmSignal/Makefile               \
1188
 
   lib/wiper/Makefile                  \
1189
 
   lib/xdg/Makefile                    \
1190
 
   services/Makefile                   \
1191
 
   services/vmtoolsd/Makefile          \
1192
 
   services/plugins/Makefile           \
1193
 
   services/plugins/desktopEvents/Makefile \
1194
 
   services/plugins/dndcp/Makefile     \
1195
 
   services/plugins/guestInfo/Makefile \
1196
 
   services/plugins/guestInfo/getlib/Makefile \
1197
 
   services/plugins/hgfsServer/Makefile \
1198
 
   services/plugins/powerOps/Makefile  \
1199
 
   services/plugins/resolutionSet/Makefile \
1200
 
   services/plugins/timeSync/Makefile  \
1201
 
   services/plugins/vix/Makefile       \
1202
 
   services/plugins/vmbackup/Makefile  \
1203
 
   vmware-user-suid-wrapper/Makefile   \
1204
 
   toolbox/Makefile                    \
1205
 
   hgfsclient/Makefile                 \
1206
 
   hgfsmounter/Makefile                \
1207
 
   checkvm/Makefile                    \
1208
 
   rpctool/Makefile                    \
1209
 
   libguestlib/Makefile                \
1210
 
   libguestlib/vmguestlib.pc           \
1211
 
   libhgfs/Makefile                    \
1212
 
   libvmtools/Makefile                 \
1213
 
   xferlogs/Makefile                   \
1214
 
   modules/Makefile                    \
1215
 
   vmblock-fuse/Makefile               \
1216
 
   vmblockmounter/Makefile             \
1217
 
   tests/Makefile                      \
1218
 
   tests/vmrpcdbg/Makefile             \
1219
 
   tests/testDebug/Makefile            \
1220
 
   tests/testPlugin/Makefile           \
1221
 
   tests/testVmblock/Makefile          \
1222
 
   docs/Makefile                       \
1223
 
   docs/api/Makefile                   \
1224
 
   scripts/Makefile                            \
1225
 
   scripts/build/rpcgen_wrapper.sh     \
1226
 
])
1227
 
 
1228
 
###
1229
 
### Output
1230
 
###
1231
 
AC_OUTPUT