Fix inotify detection
[gd/samba/.git] / source / configure.in
index afe68d7613ac079b49d7e20a9ca142335cd2aaba..1c326a8ea23dff4f662def3bfde8d1c189d24180 100644 (file)
@@ -18,25 +18,7 @@ esac
 builddir=`pwd`
 AC_SUBST(builddir)
 
-SMB_VERSION_STRING=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
-echo "SAMBA VERSION: ${SMB_VERSION_STRING}"
-
-SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2`
-if test -n "${SAMBA_VERSION_GIT_COMMIT_FULLREV}";then
-       echo "BUILD COMMIT REVISION: ${SAMBA_VERSION_GIT_COMMIT_FULLREV}"
-fi
-SAMBA_VERSION_GIT_COMMIT_DATE=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_DATE' | cut -d ' ' -f3-`
-if test -n "${SAMBA_VERSION_GIT_COMMIT_DATE}";then
-       echo "BUILD COMMIT DATE: ${SAMBA_VERSION_GIT_COMMIT_DATE}"
-fi
-SAMBA_VERSION_GIT_COMMIT_TIME=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_TIME' | cut -d ' ' -f3-`
-if test -n "${SAMBA_VERSION_GIT_COMMIT_TIME}";then
-       echo "BUILD COMMIT TIME: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
-
-       # just to keep the build-farm gui happy for now...
-       echo "BUILD REVISION: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
-fi
-
+m4_include(m4/samba_version.m4)
 m4_include(m4/check_path.m4)
 
 AC_LIBREPLACE_CC_CHECKS
@@ -101,18 +83,6 @@ AC_SUBST(UNINSTALL_LIBADDNS)
 AC_SUBST(LIBADDNS_SHARED)
 AC_SUBST(LIBADDNS)
 
-AC_SUBST(LIBTALLOC_STATIC_TARGET)
-AC_SUBST(LIBTALLOC_SHARED_TARGET)
-AC_SUBST(LIBTALLOC_SHARED)
-AC_SUBST(LIBTALLOC_STATIC)
-AC_SUBST(LIBTALLOC_LIBS)
-
-AC_SUBST(LIBTDB_STATIC_TARGET)
-AC_SUBST(LIBTDB_SHARED_TARGET)
-AC_SUBST(LIBTDB_SHARED)
-AC_SUBST(LIBTDB_STATIC)
-AC_SUBST(LIBTDB_LIBS)
-
 AC_SUBST(INSTALL_LIBWBCLIENT)
 AC_SUBST(UNINSTALL_LIBWBCLIENT)
 AC_SUBST(LIBWBCLIENT_SHARED)
@@ -131,12 +101,6 @@ AC_SUBST(UNINSTALL_LIBSMBSHAREMODES)
 AC_SUBST(LIBSMBSHAREMODES_SHARED)
 AC_SUBST(LIBSMBSHAREMODES)
 
-AC_SUBST(LIBNETAPI_SHARED_TARGET)
-AC_SUBST(LIBNETAPI_STATIC_TARGET)
-AC_SUBST(LIBNETAPI_SHARED)
-AC_SUBST(LIBNETAPI_STATIC)
-AC_SUBST(LIBNETAPI_LIBS)
-
 AC_SUBST(PRINT_LIBS)
 AC_SUBST(AUTH_LIBS)
 AC_SUBST(ACL_LIBS)
@@ -792,13 +756,8 @@ AC_TYPE_SIZE_T
 AC_TYPE_PID_T
 AC_STRUCT_ST_RDEV
 AC_DIRENT_D_OFF
-AC_CHECK_TYPE(ino_t,unsigned)
-AC_CHECK_TYPE(loff_t,off_t)
-AC_CHECK_TYPE(offset_t,loff_t)
 AC_CHECK_TYPE(ssize_t, int)
 AC_CHECK_TYPE(wchar_t, unsigned short)
-AC_CHECK_TYPE(comparison_fn_t,
-[AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])])
 
 ############################################
 # for cups support we need libcups, and a handful of header files
@@ -863,7 +822,7 @@ AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [
 ],
        samba_cv_unixsocket=yes,samba_cv_unixsocket=no)])
 if test x"$samba_cv_unixsocket" = x"yes"; then
-   AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixscoket support])
+   AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixsocket support])
 fi
 
 
@@ -907,10 +866,6 @@ fi
 AC_HAVE_DECL(errno, [#include <errno.h>])
 AC_HAVE_DECL(setresuid, [#include <unistd.h>])
 AC_HAVE_DECL(setresgid, [#include <unistd.h>])
-AC_HAVE_DECL(asprintf, [#include <stdio.h>])
-AC_HAVE_DECL(vasprintf, [#include <stdio.h>])
-AC_HAVE_DECL(vsnprintf, [#include <stdio.h>])
-AC_HAVE_DECL(snprintf, [#include <stdio.h>])
 
 # and glibc has setresuid under linux but the function does
 # nothing until kernel 2.1.44! very dumb.
@@ -1062,7 +1017,7 @@ AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror chown fchown lchow
 AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtouq __strtoull)
 AC_CHECK_FUNCS(fstat strchr utime utimes chflags)
 AC_CHECK_FUNCS(getrlimit fsync fdatasync memset strlcpy strlcat setpgid)
-AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid)
+AC_CHECK_FUNCS(memmove setsid glob strpbrk pipe crypt16 getauthuid)
 AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
 AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf realpath)
 AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate chsize stat64 fstat64)
@@ -1618,7 +1573,7 @@ DSO_EXPORTS=""
                        ;;
                *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix])
                        BLDSHARED="true"
-                       LDSHFLAGS="-Wl,-G,-bexpall,-bbigtoc"
+                       LDSHFLAGS="-Wl,-G,-bexpfull,-bbigtoc"
                        DYNEXP="-Wl,-brtl,-bexpfull,-bbigtoc"
                        PICFLAG="-O2"
                        # as AIX code is always position independent...
@@ -2032,54 +1987,6 @@ if test x"$samba_cv_WITH_PROFILE" = x"yes"; then
 
 fi
 
-AC_CACHE_CHECK([for va_copy],samba_cv_HAVE_VA_COPY,[
-AC_TRY_LINK([#include <stdarg.h>
-va_list ap1,ap2;], [va_copy(ap1,ap2);],
-samba_cv_HAVE_VA_COPY=yes,
-samba_cv_HAVE_VA_COPY=no)])
-if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
-    AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
-else
-    AC_CACHE_CHECK([for __va_copy],samba_cv_HAVE___VA_COPY,[
-    AC_TRY_LINK([#include <stdarg.h>
-    va_list ap1,ap2;], [__va_copy(ap1,ap2);],
-    samba_cv_HAVE___VA_COPY=yes,
-    samba_cv_HAVE___VA_COPY=no)])
-    if test x"$samba_cv_HAVE___VA_COPY" = x"yes"; then
-        AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
-    fi
-fi
-
-AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <stdarg.h>
-void foo(const char *format, ...) {
-       va_list ap;
-       int len;
-       char buf[5];
-
-       va_start(ap, format);
-       len = vsnprintf(buf, 0, format, ap);
-       va_end(ap);
-       if (len != 5) exit(1);
-
-       va_start(ap, format);
-       len = vsnprintf(0, 0, format, ap);
-       va_end(ap);
-       if (len != 5) exit(1);
-
-       if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
-
-       exit(0);
-}
-main() { foo("hello"); }
-],
-samba_cv_HAVE_C99_VSNPRINTF=yes,samba_cv_HAVE_C99_VSNPRINTF=no,samba_cv_HAVE_C99_VSNPRINTF=cross)])
-if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
-    AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Whether there is a C99 compliant vsnprintf])
-fi
-
 AC_CACHE_CHECK([for broken readdir name],samba_cv_HAVE_BROKEN_READDIR_NAME,[
 AC_TRY_RUN([#include <sys/types.h>
 #include <dirent.h>
@@ -2455,7 +2362,7 @@ fi
 
 AC_CACHE_CHECK([for inotify support],samba_cv_HAVE_INOTIFY,[
 AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h)
-AC_CHECK_FUNC(inotify_init)
+AC_CHECK_FUNCS(inotify_init)
 AC_HAVE_DECL(__NR_inotify_init, [#include <asm/unistd.h>])
 ],
 samba_cv_HAVE_INOTIFY=yes,
@@ -2690,28 +2597,6 @@ if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
     AC_DEFINE(HAVE_BROKEN_GETGROUPS,1,[Whether getgroups is broken])
 fi
 
-AC_CACHE_CHECK([for secure mkstemp],samba_cv_HAVE_SECURE_MKSTEMP,[
-AC_TRY_RUN([#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-main() {
-  struct stat st;
-  char tpl[20]="/tmp/test.XXXXXX";
-  int fd = mkstemp(tpl);
-  if (fd == -1) exit(1);
-  unlink(tpl);
-  if (fstat(fd, &st) != 0) exit(1);
-  if ((st.st_mode & 0777) != 0600) exit(1);
-  exit(0);
-}],
-samba_cv_HAVE_SECURE_MKSTEMP=yes,
-samba_cv_HAVE_SECURE_MKSTEMP=no,
-samba_cv_HAVE_SECURE_MKSTEMP=cross)])
-if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
-    AC_DEFINE(HAVE_SECURE_MKSTEMP,1,[Whether mkstemp is secure])
-fi
-
 AC_CACHE_CHECK([for broken readdir],samba_cv_HAVE_BROKEN_READDIR,[
        AC_TRY_RUN([#include "${srcdir-.}/tests/os2_delete.c"],
                [samba_cv_HAVE_BROKEN_READDIR=no],
@@ -2736,102 +2621,6 @@ SMB_CHECK_SYSCONF(_SC_NPROCESSORS_ONLN)
 SMB_CHECK_SYSCONF(_SC_PAGESIZE)
 AC_CHECK_FUNCS(getpagesize)
 
-dnl test for getifaddrs and freeifaddrs
-AC_CACHE_CHECK([for getifaddrs and freeifaddrs],samba_cv_HAVE_GETIFADDRS,[
-AC_TRY_COMPILE([
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ifaddrs.h>
-#include <netdb.h>],
-[
-struct ifaddrs *ifp = NULL;
-int ret = getifaddrs (&ifp);
-freeifaddrs(ifp);
-],
-samba_cv_HAVE_GETIFADDRS=yes,samba_cv_HAVE_GETIFADDRS=no)])
-if test x"$samba_cv_HAVE_GETIFADDRS" = x"yes"; then
-    AC_DEFINE(HAVE_GETIFADDRS,1,[Whether the system has getifaddrs])
-    AC_DEFINE(HAVE_FREEIFADDRS,1,[Whether the system has freeifaddrs])
-fi
-
-##################
-# look for a method of finding the list of network interfaces
-iface=no;
-AC_CACHE_CHECK([for iface getifaddrs],samba_cv_HAVE_IFACE_GETIFADDRS,[
-SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
-AC_TRY_RUN([
-#define NO_CONFIG_H 1
-#define HAVE_IFACE_GETIFADDRS 1
-#define AUTOCONF_TEST 1
-#include "${srcdir-.}/lib/replace/replace.c"
-#include "${srcdir-.}/lib/interfaces.c"],
-           samba_cv_HAVE_IFACE_GETIFADDRS=yes,samba_cv_HAVE_IFACE_GETIFADDRS=no,samba_cv_HAVE_IFACE_GETIFADDRS=cross)])
-CPPFLAGS="$SAVE_CPPFLAGS"
-if test x"$samba_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then
-    iface=yes;AC_DEFINE(HAVE_IFACE_GETIFADDRS,1,[Whether iface getifaddrs is available])
-fi
-
-if test $iface = no; then
-AC_CACHE_CHECK([for iface ifconf],samba_cv_HAVE_IFACE_IFCONF,[
-SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
-AC_TRY_RUN([
-#define NO_CONFIG_H 1
-#define HAVE_IFACE_IFCONF 1
-#define AUTOCONF_TEST 1
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include "${srcdir-.}/lib/replace/replace.c"
-#include "${srcdir-.}/lib/interfaces.c"],
-           samba_cv_HAVE_IFACE_IFCONF=yes,samba_cv_HAVE_IFACE_IFCONF=no,samba_cv_HAVE_IFACE_IFCONF=cross)])
-CPPFLAGS="$SAVE_CPPFLAGS"
-if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
-    iface=yes;AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available])
-fi
-fi
-
-if test $iface = no; then
-AC_CACHE_CHECK([for iface ifreq],samba_cv_HAVE_IFACE_IFREQ,[
-SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
-AC_TRY_RUN([
-#define NO_CONFIG_H 1
-#define HAVE_IFACE_IFREQ 1
-#define AUTOCONF_TEST 1
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include "${srcdir-.}/lib/replace/replace.c"
-#include "${srcdir-.}/lib/replace/getaddrinfo.c"
-#include "${srcdir-.}/lib/replace/snprintf.c"
-#include "${srcdir-.}/lib/interfaces.c"],
-           samba_cv_HAVE_IFACE_IFREQ=yes,samba_cv_HAVE_IFACE_IFREQ=no,samba_cv_HAVE_IFACE_IFREQ=cross)])
-CPPFLAGS="$SAVE_CPPFLAGS"
-if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
-    iface=yes;AC_DEFINE(HAVE_IFACE_IFREQ,1,[Whether iface ifreq is available])
-fi
-fi
-
-if test $iface = no; then
-AC_CACHE_CHECK([for iface AIX],samba_cv_HAVE_IFACE_AIX,[
-SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
-AC_TRY_RUN([
-#define NO_CONFIG_H 1
-#define HAVE_IFACE_AIX 1
-#define AUTOCONF_TEST 1
-#undef _XOPEN_SOURCE_EXTENDED
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include "${srcdir-.}/lib/replace/replace.c"
-#include "${srcdir-.}/lib/replace/snprintf.c"
-#include "${srcdir-.}/lib/interfaces.c"],
-           samba_cv_HAVE_IFACE_AIX=yes,samba_cv_HAVE_IFACE_AIX=no,samba_cv_HAVE_IFACE_AIX=cross)])
-CPPFLAGS="$SAVE_CPPFLAGS"
-if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
-    iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available])
-fi
-fi
-
 dnl test for ipv6
 AC_CACHE_CHECK([for ipv6 support],samba_cv_HAVE_IPV6,[
 AC_TRY_COMPILE([
@@ -2927,13 +2716,6 @@ if test x"$samba_cv_DARWIN_INITGROUPS" = x"yes" ; then
        [Whether to use the Darwin-specific initgroups system call])
 fi
 
-AC_CACHE_CHECK([for working mmap],samba_cv_HAVE_MMAP,[
-AC_TRY_RUN([#include "${srcdir-.}/tests/shared_mmap.c"],
-           samba_cv_HAVE_MMAP=yes,samba_cv_HAVE_MMAP=no,samba_cv_HAVE_MMAP=cross)])
-if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
-    AC_DEFINE(HAVE_MMAP,1,[Whether mmap works])
-fi
-
 AC_CACHE_CHECK([for fcntl locking],samba_cv_HAVE_FCNTL_LOCK,[
 AC_TRY_RUN([#include "${srcdir-.}/tests/fcntl_lock.c"],
            samba_cv_HAVE_FCNTL_LOCK=yes,samba_cv_HAVE_FCNTL_LOCK=no,samba_cv_HAVE_FCNTL_LOCK=cross)])
@@ -4870,6 +4652,31 @@ if test $enable_static = yes; then
        UNINSTALLLIBCMD_A="rm -f"
 fi
 
+#################################################
+# --disable-shared-libs
+# can be used to disable the internal use of shared libs altogether
+# (this only has an effect when building shared libs is enabled)
+#
+USESHARED=false
+AC_SUBST(USESHARED)
+
+AC_MSG_CHECKING(whether to use shared libraries internally)
+AC_ARG_ENABLE([shared-libs],
+       AS_HELP_STRING([--enable-shared-libs],
+               [Use shared libraries internally (default=yes)]),
+       [enable_shared_libs=$enableval],
+       [enable_shared_libs=yes])
+
+if test x"$enable_shared_libs" != x"no" ; then
+       USESHARED=$BLDSHARED
+fi
+
+AC_MSG_RESULT([$USESHARED])
+
+if test x"$enable_shared_libs" = x"yes" -a x"$BLDSHARED" != x"true" ; then
+       AC_MSG_WARN([--enable-shared-libs: no support for shared libraries])
+fi
+
 #################################################
 # --with-static-libs=LIBS:
 #   link (internal) libs dynamically or statically?
@@ -4902,136 +4709,11 @@ AC_ARG_WITH([static-libs],
                done], [])],
        [])
 
-#################################################
-# should we build libtalloc?
-LIBTALLOC_SHARED_TARGET=bin/libtalloc.$SHLIBEXT
-LIBTALLOC_STATIC_TARGET=bin/libtalloc.a
-LIBTALLOC_SHARED=
-LIBTALLOC_STATIC=
-LIBTALLOC_LIBS=
-
-AC_MSG_CHECKING(whether to build the libtalloc shared library)
-AC_ARG_WITH(libtalloc,
-[AS_HELP_STRING([--with-libtalloc],
-       [Build the libtalloc shared library (default=yes if shared libs supported)])],
-[
-case "$withval" in
-       *)
-               AC_MSG_RESULT(no)
-               ;;
-       yes)
-               samba_cv_with_libtalloc=yes
-               ;;
-esac
-],
-[
-# if unspecified, default is to build it if possible.
-samba_cv_with_libtalloc=yes
-]
-)
-
-if test x"$samba_cv_with_libtalloc" = "xyes" -a $BLDSHARED = true; then
-       LIBTALLOC_SHARED=$LIBTALLOC_SHARED_TARGET
-       AC_MSG_RESULT(yes)
-       if test x"$LINK_LIBTALLOC" = "xSTATIC" ; then
-               LIBTALLOC_STATIC=$LIBTALLOC_STATIC_TARGET
-       else
-               LIBTALLOC_LIBS=-ltalloc
-       fi
-else
-       enable_static=yes
-       AC_MSG_RESULT(no shared library support -- will supply static library)
-fi
-if test $enable_static = yes; then
-       LIBTALLOC_STATIC=$LIBTALLOC_STATIC_TARGET
-fi
-
-#################################################
-# should we build libtdb?
-LIBTDB_SHARED_TARGET=bin/libtdb.$SHLIBEXT
-LIBTDB_STATIC_TARGET=bin/libtdb.a
-LIBTDB_SHARED=
-LIBTDB_STATIC=
-LIBTDB_LIBS=
-
-AC_MSG_CHECKING(whether to build the libtdb shared library)
-AC_ARG_WITH(libtdb,
-[AS_HELP_STRING([--with-libtdb],
-       [Build the libtdb shared library (default=yes if shared libs supported)])],
-[
-case "$withval" in
-       *)
-               AC_MSG_RESULT(no)
-               ;;
-       yes)
-               samba_cv_with_libtdb=yes
-               ;;
-esac
-],
-[
-# if unspecified, default is to build it if possible.
-samba_cv_with_libtdb=yes
-]
-)
-
-if test x"$samba_cv_with_libtdb" = "xyes" -a $BLDSHARED = true; then
-       LIBTDB_SHARED=$LIBTDB_SHARED_TARGET
-       AC_MSG_RESULT(yes)
-       if test x"$LINK_LIBTDB" = "xSTATIC" ; then
-               LIBTDB_STATIC=$LIBTDB_STATIC_TARGET
-       else
-               LIBTDB_LIBS=-ltdb
-       fi
-else
-       enable_static=yes
-       AC_MSG_RESULT(no shared library support -- will supply static library)
-fi
-if test $enable_static = yes; then
-       LIBTDB_STATIC=$LIBTDB_STATIC_TARGET
-fi
 
-#################################################
-# should we build libnetapi?
-LIBNETAPI_SHARED_TARGET=bin/libnetapi.$SHLIBEXT
-LIBNETAPI_STATIC_TARGET=bin/libnetapi.a
-LIBNETAPI_SHARED=
-LIBNETAPI_STATIC=
-LIBNETAPI_LIBS=
-
-AC_MSG_CHECKING(whether to build the libnetapi shared library)
-AC_ARG_WITH(libnetapi,
-[AS_HELP_STRING([--with-libnetapi], [Build the libnetapi shared library (default=yes if shared libs supported)])],
-[
-case "$withval" in
-       *)
-               AC_MSG_RESULT(no)
-               ;;
-       yes)
-               samba_cv_with_libnetapi=yes
-               ;;
-esac
-],
-[
-# if unspecified, default is to build it if possible.
-samba_cv_with_libnetapi=yes
-]
-)
+SMB_LIBRARY(talloc)
+SMB_LIBRARY(tdb)
+SMB_LIBRARY(netapi)
 
-if test x"$samba_cv_with_libnetapi" = x"yes" -a $BLDSHARED = true; then
-       LIBNETAPI_SHARED=$LIBNETAPI_SHARED_TARGET
-       AC_MSG_RESULT(yes)
-       if test x"$LINK_LIBNETAPI" = x"STATIC" ; then
-               LIBNETAPI_STATIC=$LIBNETAPI_STATIC_TARGET
-       else
-               LIBNETAPI_LIBS=-lnetapi
-       fi
-else
-       enable_static=yes
-       AC_MSG_RESULT(no shared library support -- will supply static library)
-fi
-if test x"$enable_static" = x"yes"; then
-       LIBNETAPI_STATIC=$LIBNETAPI_STATIC_TARGET
-fi
 
 #################################################
 # should we build libaddns?