~n-muench/ubuntu/oneiric/open-vm-tools/open-vm-tools.fix-836277

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Evan Broder
  • Date: 2010-03-21 23:26:53 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: broder@mit.edu-20100321232653-5a57r7v7ch4o6byv
Merging shared upstream rev into target branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#
30
30
# The following libraries are currently tested: DNET, FUSE, GLIB2, GMODULE,
31
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".
32
36
################################################################################
33
37
 
34
38
###
35
39
### Initialization
36
40
###
37
41
 
38
 
TOOLS_VERSION="2009.11.16"
 
42
TOOLS_VERSION="2010.02.23"
39
43
AC_INIT(
40
44
   [open-vm-tools],
41
 
   [2009.11.16],
 
45
   [2010.02.23],
42
46
   [open-vm-tools-devel@lists.sourceforge.net])
43
47
 
44
48
# In order to make this configure script auto-detect situations where
199
203
   [enable_docs="$enableval"],
200
204
   [enable_docs="yes"])
201
205
 
 
206
AC_ARG_ENABLE(
 
207
   tests,
 
208
   AS_HELP_STRING(
 
209
      [--disable-tests],
 
210
      [disable compilation of test code.]),
 
211
   [enable_tests="$enableval"],
 
212
   [enable_tests="auto"])
 
213
 
202
214
# If we're not going to use Gtk 2.0, disable Unity.
203
215
if test "$with_gtk2" != "yes"; then
204
216
   enable_unity="no"
374
386
      [with_pam=yes])
375
387
 
376
388
   if test "$with_pam" = "yes"; then
377
 
      if test -z "$CUSTOM_PAM_CPPFLAGS"; then
378
 
         # Assume PAM headers are in /usr/include by default.
379
 
         CUSTOM_PAM_CPPFLAGS="-I/usr/include"
380
 
      fi
 
389
      AC_VMW_DEFAULT_FLAGS([PAM])
381
390
      AC_VMW_CHECK_LIB([pam],
382
391
                       [PAM],
383
392
                       [],
390
399
   fi
391
400
fi
392
401
 
 
402
#
 
403
# Check for CUnit and disable test code if not available.
 
404
#
 
405
if test "$enable_tests" = "auto" -o "$enable_tests" = "yes"; then
 
406
   AC_VMW_DEFAULT_FLAGS([CUNIT])
 
407
   AC_VMW_CHECK_LIB([cunit],
 
408
                    [CUNIT],
 
409
                    [],
 
410
                    [],
 
411
                    [],
 
412
                    [CUnit/CUnit.h],
 
413
                    [CU_initialize_registry],
 
414
                    [have_cunit=yes],
 
415
                    [have_cunit=no])
 
416
   if test "$have_cunit" = "no"; then
 
417
      if test "$enable_tests" = "yes"; then
 
418
         AC_VMW_LIB_ERROR([CUNIT], [cunit])
 
419
      else
 
420
         AC_MSG_WARN([CUnit not found, tests won't be compiled.])
 
421
      fi
 
422
   fi
 
423
fi
393
424
 
394
425
# If the user explicitly disables X11, then don't try to detect the X-related libraries
395
426
if test "$have_x" = "disabled"; then
461
492
   # libraries.
462
493
   if test "$enable_unity" != "no"; then
463
494
 
464
 
           # Unity needs the X11 Screen Saver extension library. It should be
 
495
      # Unity needs the X11 Screen Saver extension library. It should be
465
496
           # in the same place as the X11 libraries, so no need for any fancy
466
497
           # path checking.
467
 
           AC_CHECK_LIB(
468
 
              [Xss],
469
 
              [XScreenSaverQueryExtension],
470
 
              [COMMON_XLIBS="-lXss $COMMON_XLIBS"],
471
 
              [AC_MSG_ERROR(
472
 
                 [libXss not found. Please configure without Unity (using --disable-unity) or install the libXss devel package.])],
473
 
              [$COMMON_XLIBS])
 
498
           AC_VMW_CHECK_X11_LIB(
 
499
              [Xss],
 
500
              [X11/extensions/scrnsaver.h],
 
501
              [XScreenSaverQueryExtension],
 
502
              [AC_MSG_ERROR([libXss or headers not found. Please configure without Unity (using --disable-unity) or install the libXss devel package.])])
474
503
 
475
504
           # Check for the uriparser library and headers. The upstream uriparser
476
505
           # doesn't appear to ship with either a pkg-config file or a
480
509
           # Note that we look for uriFreeQueryListA because it's a relatively
481
510
           # new symbol that our code needs (it isn't present in the uriparser
482
511
           # that shipped with Ubuntu Hardy).
483
 
           if test -z "$CUSTOM_URIPARSER_CPPFLAGS"; then
484
 
              # XXX: No pkg-config and no uriparser-config means we need to
485
 
              # hard-code a sensible default.
486
 
              CUSTOM_URIPARSER_CPPFLAGS="-I/usr/include/uriparser"
487
 
           fi
 
512
           AC_VMW_DEFAULT_FLAGS([URIPARSER], [uriparser])
488
513
           AC_VMW_CHECK_LIB([uriparser],
489
514
                            [URIPARSER],
490
515
                            [],
508
533
 
509
534
           # Check for the zlib library and headers. Like uriparser, there
510
535
           # isn't a pkg-config or zlib-config file.
511
 
           if test -z "$CUSTOM_ZLIB_CPPFLAGS"; then
512
 
              # XXX: No pkg-config and no zlib-config means we need to
513
 
              # hard-code a sensible default.
514
 
              CUSTOM_ZLIB_CPPFLAGS="-I/usr/include"
515
 
           fi
 
536
           AC_VMW_DEFAULT_FLAGS([ZLIB])
516
537
           AC_VMW_CHECK_LIB([z],
517
538
                            [ZLIB],
518
539
                            [],
575
596
   [AC_MSG_ERROR(
576
597
      [libcrypt not found. Please install the libc/libcrypt devel package(s).])])
577
598
 
578
 
AC_CHECK_LIB(
579
 
   [notify],
580
 
   [notify_init],
581
 
   [HAVE_NOTIFY="yes"
582
 
    VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lnotify"],
583
 
   [AC_MSG_WARN([libnotify not found; notification disabled])])
584
 
 
585
599
AC_CHECK_FUNCS(
586
600
   dlopen,
587
601
   ,
630
644
fi
631
645
 
632
646
if test "$with_procps" = "yes"; then
633
 
   # XXX: Force CUSTOM_PROCPS_LIBS to have something so that AC_VMW_CHECK_LIB
634
 
   # properly performs the library check.
 
647
   if test -z "$CUSTOM_PROCPS_NAME"; then
 
648
      CUSTOM_PROCPS_NAME=proc
 
649
   fi
 
650
 
 
651
   # XXX: no pkg-config and no procps-config means we need to
 
652
   # hard-code a sensible default.
635
653
   if test -z "$CUSTOM_PROCPS_LIBS"; then
636
654
      CUSTOM_PROCPS_LIBS="-L/lib"
637
655
   fi
638
 
   AC_VMW_CHECK_LIB([proc-3.2.7],
 
656
 
 
657
   # Some distros provide libproc-${version}.so only, others provide the
 
658
   # libproc.so symlink. Try both to see what sticks (but only try the 3.2.7
 
659
   # version - adding every possible version here would be a mess).
 
660
   #
 
661
   # Users can help by providing CUSTOM_PROCPS_NAME / CUSTOM_PROCPS_LIBS if
 
662
   # necessary.
 
663
   have_procps=no
 
664
 
 
665
   AC_VMW_CHECK_LIB([$CUSTOM_PROCPS_NAME],
639
666
                    [PROCPS],
640
667
                    [],
641
668
                    [],
642
669
                    [],
643
670
                    [],
644
671
                    [getstat],
645
 
                    [VMWARE_USER_LDADD="$VMWARE_USER_LDADD $PROCPS_LIBS"],
646
 
                    [AC_MSG_ERROR([libproc not found. Please configure without procps (using --without-procps) or install procps - http://procps.sourceforge.net])])
 
672
                    [
 
673
                     have_procps=yes;
 
674
                     VMWARE_USER_LDADD="$VMWARE_USER_LDADD $PROCPS_LIBS"
 
675
                    ],
 
676
                    [])
 
677
 
 
678
   if test "$have_procps" = "no"; then
 
679
      AC_VMW_CHECK_LIB([proc-3.2.7],
 
680
                       [PROCPS],
 
681
                       [],
 
682
                       [],
 
683
                       [],
 
684
                       [],
 
685
                       [getstat],
 
686
                       [VMWARE_USER_LDADD="$VMWARE_USER_LDADD $PROCPS_LIBS"],
 
687
                       [AC_MSG_ERROR([libproc not found. Please configure without procps (using --without-procps) or install procps - http://procps.sourceforge.net])])
 
688
   fi
647
689
fi
648
690
 
649
691
if test "$with_procps" != "yes"; then
770
812
   [HAVE_WCHAR_H="yes"],
771
813
   [HAVE_WCHAR_H="no"])
772
814
 
 
815
if test "$os" = "linux"; then
 
816
   # Make sure kernel-headers package is installed.
 
817
   AC_CHECK_HEADER(
 
818
      [linux/unistd.h],
 
819
      [],
 
820
      [AC_MSG_ERROR(linux/unistd.h is not found. Please install kernel-headers/linux-userspace-headers/linux-libc-dev package.)])
 
821
fi
 
822
 
773
823
if test "$enable_multimon" != "no"; then
774
824
   AC_CHECK_HEADER(
775
825
      [X11/extensions/panoramiXproto.h],
800
850
### Specific features and OS/arch flags / actions
801
851
###
802
852
 
803
 
# Check to see if SYS_setuid32 is defined. If SYS_setuid32 is unknown, we will
804
 
# certainly error out.
805
 
if test "$os$userSpaceBitness" = "linux32"; then
806
 
   AC_MSG_CHECKING([for SYS_setuid32])
807
 
   AC_TRY_COMPILE(
808
 
      [#include <sys/syscall.h>
809
 
       #include <unistd.h>],
810
 
      [
811
 
         syscall(SYS_setuid32, 1);
812
 
      ],
813
 
      [HAVE_SYS_SETUID="yes"],
814
 
      [HAVE_SYS_SETUID="no"])
815
 
   AC_MSG_RESULT($HAVE_SYS_SETUID)
816
 
fi
817
 
 
818
853
# Newer iconv (from glibc 2.2 and later on Linux) takes a char ** as the second
819
854
# argument. Here, we test for the older form and expect a compiler warning/error
820
855
# if the newer form is defined (because, in that case, we would be attempting to
956
991
   CPPFLAGS="$CPPFLAGS -D_SVID_SOURCE"
957
992
 
958
993
   MODULES="$MODULES vmmemctl vmsync vmci vsock"
959
 
   MODULES="$MODULES vmxnet vmxnet3 pvscsi"
 
994
   MODULES="$MODULES vmxnet pvscsi"
960
995
   MODULES="$MODULES vmblock vmhgfs"
961
996
   buildHgfsmounter=yes
962
997
fi
989
1024
 
990
1025
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lsocket"
991
1026
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lnsl"
 
1027
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lresolv"
992
1028
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrpcsvc"
993
1029
 
994
1030
   VMWARE_USER_CPPFLAGS="$VMWARE_USER_CPPFLAGS -I/usr/X11/include/"
1009
1045
      CPPFLAGS="$CPPFLAGS -DSOL11"
1010
1046
   fi
1011
1047
 
1012
 
   # Choose which modules to compile
 
1048
   MODULES="$MODULES vmxnet vmmemctl"
 
1049
 
 
1050
   # HGFS and vmblock need Solaris 10 at least.
1013
1051
   if test "$osVersion" -ge 510000; then
1014
1052
      MODULES="$MODULES vmhgfs vmblock"
1015
1053
   fi
1016
1054
 
1017
 
   # We build vmxnet and vmballoon on Solaris 9 and 10
1018
 
   if test "$osVersion" -lt 511000 -a "$osVersion" -ge 509000; then
1019
 
      MODULES="$MODULES vmxnet vmmemctl"
1020
 
   fi
1021
 
 
1022
 
   # Vmxnet3 is built on Solaris 10 only and only if GLDv3 is installed
1023
 
   if test "$osVersion" -eq 510000; then
 
1055
   # vmxnet3 is built on Solaris 10 / 11 only if GLDv3 is installed.
 
1056
   if test "$osVersion" -gt 510000; then
1024
1057
      AC_CHECK_HEADER(
1025
1058
         [sys/mac.h],
1026
1059
         [MODULES="$MODULES vmxnet3"],
1045
1078
AM_CONDITIONAL(HAVE_ICU, test "$with_icu" = "yes")
1046
1079
AM_CONDITIONAL(WITH_KERNEL_MODULES, test "$with_kernel_modules" = "yes")
1047
1080
AM_CONDITIONAL(ENABLE_UNITY, test "$enable_unity" = "yes")
 
1081
AM_CONDITIONAL(ENABLE_TESTS, test "$have_cunit" = "yes")
1048
1082
AM_CONDITIONAL(WITH_ROOT_PRIVILEGES, test "$with_root_privileges" = "yes")
1049
1083
AM_CONDITIONAL(HAVE_DOXYGEN, test "$have_doxygen" = "yes")
1050
1084
AM_CONDITIONAL(HAVE_FUSE, test "$have_fuse" = "yes")
1065
1099
   AC_DEFINE([NO_MULTIMON], 1, [Define to 1 if building without multimon support.])
1066
1100
fi
1067
1101
 
1068
 
if test "$os$userSpaceBitness" = "linux64" || test "$HAVE_SYS_SETUID" = "yes"; then
1069
 
   LIB_MISC_CPPFLAGS="$LIB_MISC_CPPFLAGS -DGLIBC_VERSION_21"
1070
 
fi
1071
 
 
1072
 
if test "$HAVE_NEW_ICONV" = "yes"; then
1073
 
   LIB_MISC_CPPFLAGS="$LIB_MISC_CPPFLAGS -DGLIBC_VERSION_22"
1074
 
fi
1075
 
 
1076
 
if test "$HAVE_LSEEK" = "yes"; then
1077
 
   LIB_FILE_CPPFLAGS="$LIB_FILE_CPPFLAGS -DGLIBC_VERSION_21"
1078
 
   LIB_HGFS_SERVER_CPPFLAGS="$LIB_HGFS_SERVER_CPPFLAGS -DGLIBC_VERSION_21"
1079
 
fi
1080
 
 
1081
 
if test "$HAVE_SETRESUID" = "yes"; then
1082
 
   LIB_PROC_MGR_CPPFLAGS="$LIB_PROC_MGR_CPPFLAGS -DGLIBC_VERSION_23"
 
1102
if test "$os" = "linux"; then
 
1103
   if test "$HAVE_LSEEK" = "yes"; then
 
1104
      CPPFLAGS="$CPPFLAGS -DGLIBC_VERSION_21"
 
1105
   fi
 
1106
 
 
1107
   if test "$HAVE_NEW_ICONV" = "yes"; then
 
1108
      CPPFLAGS="$CPPFLAGS -DGLIBC_VERSION_22"
 
1109
   fi
 
1110
 
 
1111
   if test "$HAVE_SETRESUID" = "yes"; then
 
1112
      CPPFLAGS="$CPPFLAGS -DGLIBC_VERSION_23"
 
1113
   fi
1083
1114
fi
1084
1115
 
1085
1116
LIB_AUTH_CPPFLAGS="$LIB_AUTH_CPPFLAGS $PAM_CPPFLAGS"
1086
1117
if test "$HAVE_CRYPT" = "yes"; then
1087
 
   LIB_AUTH_CPPFLAGS="$LIB_AUTH_CPPFLAGS -DGLIBC_VERSION_22"
1088
1118
   LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lcrypt"
1089
1119
   VIX_LIBADD="$VIX_LIBADD -lcrypt"
1090
1120
fi
1091
1121
 
1092
 
if test "$HAVE_WCHAR_H" = "yes"; then
1093
 
   LIB_STRING_CPPFLAGS="$LIB_STRING_CPPFLAGS -DGLIBC_VERSION_22"
1094
 
fi
1095
1122
 
1096
1123
LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD $THREAD_LIB"
1097
1124
VIX_LIBADD="$VIX_LIBADD $THREAD_LIB"
1148
1175
### Lib substs
1149
1176
 
1150
1177
AC_SUBST([LIB_AUTH_CPPFLAGS])
1151
 
AC_SUBST([LIB_FILE_CPPFLAGS])
1152
 
AC_SUBST([LIB_HGFS_SERVER_CPPFLAGS])
1153
1178
AC_SUBST([LIB_IMPERSONATE_CPPFLAGS])
1154
 
AC_SUBST([LIB_MISC_CPPFLAGS])
1155
 
AC_SUBST([LIB_PROC_MGR_CPPFLAGS])
1156
 
AC_SUBST([LIB_STRING_CPPFLAGS])
1157
1179
AC_SUBST([LIB_USER_CPPFLAGS])
1158
1180
AC_SUBST([LIBVMTOOLS_LIBADD])
1159
1181
 
1212
1234
   lib/slashProc/Makefile              \
1213
1235
   lib/string/Makefile                 \
1214
1236
   lib/stubs/Makefile                  \
1215
 
   lib/sync/Makefile                   \
1216
1237
   lib/syncDriver/Makefile             \
1217
1238
   lib/system/Makefile                 \
1218
1239
   lib/unicode/Makefile                \