-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1264: checking for gethostbyname" >&5
-if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1269 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
-choke me
-#else
-gethostbyname();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- INET_LIB_REQ=
-else
- echo "$ac_t""no" 1>&6
-INET_LIB_REQ=yes
-fi
-
-if test "$INET_LIB_REQ" = yes; then
- echo $ac_n "checking for gethostbyname in -lbsd""... $ac_c" 1>&6
-echo "configure:1314: checking for gethostbyname in -lbsd" >&5
-ac_lib_var=`echo bsd'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lbsd $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1322 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:1333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- INET_LIB=-lbsd
-else
- echo "$ac_t""no" 1>&6
-INET_LIB=
-fi
-
-fi
-ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
-
-
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:1365: checking for socklen_t" >&5
+echo "configure:1256: checking for socklen_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 1367 "configure"
+#line 1258 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
accept(0, 0, &x);
; return 0; }
EOF
-if { (eval echo configure:1376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=socklen_t'
s%@VSNPRINTF_DEFINE@%$VSNPRINTF_DEFINE%g
s%@STRCASECMP_DEFINE@%$STRCASECMP_DEFINE%g
s%@STRNCASECMP_DEFINE@%$STRNCASECMP_DEFINE%g
-s%@INET_LIB@%$INET_LIB%g
s%@SOCKLEN_T_DEFINE@%$SOCKLEN_T_DEFINE%g
CEOF
STRNCASECMP_DEFINE=)
AC_SUBST(STRNCASECMP_DEFINE)
-dnl Under Lynx/OS 2.3, we have to link with -lbsd to resolve
-dnl gethostbyname, inet_addr, htons etc. Check if it's necessary.
-dnl NOTE: Did not want to use AC_SEARCH_LIBS which would add
-dnl -lbsd to LIBS. We set INET_LIB instead.
-AC_LANG_SAVE
-AC_LANG_C
-AC_CHECK_FUNC(gethostbyname,INET_LIB_REQ=,INET_LIB_REQ=yes)
-if test "$INET_LIB_REQ" = yes; then
- AC_CHECK_LIB(bsd,gethostbyname,INET_LIB=-lbsd,INET_LIB=)
-fi
-AC_LANG_RESTORE
-AC_SUBST(INET_LIB)
-
AC_MSG_CHECKING(for socklen_t)
AC_TRY_COMPILE(
[#include <sys/types.h>
PACKAGE = @PACKAGE@
VERSION = @VERSION@
-SUBDIRS = @ZLIB_DIR@ @JPEG_DIR@ intl rdr network Xregion rfb tx x0vncserver \
- vncviewer_unix po vncpasswd @VNCCONFIG_DIR@
+SUBDIRS = ../common intl tx x0vncserver vncviewer po vncpasswd @VNCCONFIG_DIR@
# followed by boilerplate.mk
/usr/local/vnc/classes:
% mkdir -p /usr/local/vnc/classes
- % cp java/* /usr/local/vnc/classes
+ % cp ../common/javabin/* /usr/local/vnc/classes
We recommend that you use the vncserver script to run Xvnc for you. You can
edit the script as appropriate for your site. Things you may need to change
--- /dev/null
+COMMON = @top_srcdir@/../common
+TOP = @top_srcdir@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(vncviewer_unix/vncviewer.cxx)
+AC_INIT(vncviewer/vncviewer.cxx)
PACKAGE=tightvnc
VERSION=1.5.0
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
+dnl Configure the common directory
+echo "configuring common..."
+(cd ../common; ./configure $*)
+echo "...done configuring common"
+
dnl dirty hack to prevent use of -g in CFLAGS and CXXFLAGS
ac_cv_prog_cc_g=no
ac_cv_prog_cxx_g=no
echo "using installed zlib"
ZLIB_LIB=-lz
else
- ZLIB_DIR=zlib
- ZLIB_INCLUDE='-I$(top_srcdir)/zlib'
- ZLIB_LIB='$(top_srcdir)/zlib/libz.a'
- echo "configuring zlib..."
- (cd zlib; ./configure)
- echo "...done configuring zlib"
+ ZLIB_DIR='$(COMMON)/zlib'
+ ZLIB_INCLUDE='-I$(COMMON)/zlib'
+ ZLIB_LIB='$(COMMON)/zlib/libz.a'
fi
AC_SUBST(ZLIB_DIR)
echo "using installed jpeg"
JPEG_LIB=-ljpeg
else
- JPEG_DIR=jpeg/build
- JPEG_INCLUDE='-I$(top_srcdir)/jpeg'
- JPEG_LIB='$(top_srcdir)/jpeg/build/libjpeg.a'
- echo "configuring jpeg..."
- (mkdir jpeg/build; cd jpeg/build; ../configure)
- echo "...done configuring jpeg"
+ JPEG_DIR='$(COMMON)/jpeg/build'
+ JPEG_INCLUDE='-I$(COMMON)/jpeg'
+ JPEG_LIB='$(COMMON)/jpeg/build/libjpeg.a'
fi
AC_SUBST(JPEG_DIR)
echo "vncconfig utility will not be built"
VNCCONFIG_DIR=
else
- VNCCONFIG_DIR='vncconfig_unix'
+ VNCCONFIG_DIR='vncconfig'
fi
AC_SUBST(VNCCONFIG_DIR)
fi
AC_SUBST(READDISPLAY_DEFINE)
-AC_CHECK_FUNC(vsnprintf,VSNPRINTF_DEFINE='-DHAVE_VSNPRINTF',VSNPRINTF_DEFINE=)
-AC_SUBST(VSNPRINTF_DEFINE)
-
-AC_CHECK_FUNC(strcasecmp,STRCASECMP_DEFINE='-DHAVE_STRCASECMP',
- STRCASECMP_DEFINE=)
-AC_SUBST(STRCASECMP_DEFINE)
-
-AC_CHECK_FUNC(strncasecmp,STRNCASECMP_DEFINE='-DHAVE_STRNCASECMP',
- STRNCASECMP_DEFINE=)
-AC_SUBST(STRNCASECMP_DEFINE)
-
dnl Under Lynx/OS 2.3, we have to link with -lbsd to resolve
dnl gethostbyname, inet_addr, htons etc. Check if it's necessary.
dnl NOTE: Did not want to use AC_SEARCH_LIBS which would add
AC_LANG_RESTORE
AC_SUBST(INET_LIB)
-AC_MSG_CHECKING(for socklen_t)
-AC_TRY_COMPILE(
-[#include <sys/types.h>
- #include <sys/socket.h>],
-[socklen_t x;
-accept(0, 0, &x);],
-AC_MSG_RESULT(yes)
-SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=socklen_t',
-AC_MSG_RESULT(using int)
-SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=int')
-AC_SUBST(SOCKLEN_T_DEFINE)
-
AM_GNU_GETTEXT
BOILERPLATE=boilerplate.mk
fi
fi
-AC_OUTPUT(Makefile:Makefile.in:$BOILERPLATE intl/Makefile po/Makefile.in \
- rdr/Makefile:rdr/Makefile.in:$BOILERPLATE \
- network/Makefile:network/Makefile.in:$BOILERPLATE \
- Xregion/Makefile:Xregion/Makefile.in:$BOILERPLATE \
- rfb/Makefile:rfb/Makefile.in:$BOILERPLATE \
- tx/Makefile:tx/Makefile.in:$BOILERPLATE \
- x0vncserver/Makefile:x0vncserver/Makefile.in:$BOILERPLATE \
- vncviewer_unix/Makefile:vncviewer_unix/Makefile.in:$BOILERPLATE \
- vncconfig_unix/Makefile:vncconfig_unix/Makefile.in:$BOILERPLATE \
- vncpasswd/Makefile:vncpasswd/Makefile.in:$BOILERPLATE \
+AC_OUTPUT(Makefile:common.mk:Makefile.in:$BOILERPLATE \
+ tx/Makefile:common.mk:tx/Makefile.in:$BOILERPLATE \
+ x0vncserver/Makefile:common.mk:x0vncserver/Makefile.in:$BOILERPLATE \
+ vncviewer/Makefile:common.mk:vncviewer/Makefile.in:$BOILERPLATE \
+ vncconfig/Makefile:common.mk:vncconfig/Makefile.in:$BOILERPLATE \
+ vncpasswd/Makefile:common.mk:vncpasswd/Makefile.in:$BOILERPLATE \
+ intl/Makefile \
+ po/Makefile.in \
)
OBJS = $(SRCS:.cxx=.o)
-DIR_CPPFLAGS = -I$(top_srcdir) @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
+DIR_CPPFLAGS = -I$(COMMON) @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
library = libtx.a
program = vncconfig
-DEP_LIBS = ../tx/libtx.a ../rfb/librfb.a ../network/libnetwork.a \
- ../rdr/librdr.a
+DEP_LIBS = $(TOP)/tx/libtx.a $(COMMON)/rfb/librfb.a \
+ $(COMMON)/network/libnetwork.a \
+ $(COMMON)/rdr/librdr.a
EXTRA_LIBS = @X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext @X_EXTRA_LIBS@
-DIR_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tx @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
+DIR_CPPFLAGS = -I$(COMMON) -I$(TOP)/tx @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
all:: $(program)
program = vncpasswd
-DEP_LIBS = ../rfb/librfb.a
+DEP_LIBS = $(COMMON)/rfb/librfb.a
-DIR_CPPFLAGS = -I$(top_srcdir)
+DIR_CPPFLAGS = -I$(COMMON)
all:: $(program)
program = vncviewer
-DEP_LIBS = ../tx/libtx.a ../rfb/librfb.a ../network/libnetwork.a \
- ../rdr/librdr.a
+DEP_LIBS = $(TOP)/tx/libtx.a \
+ $(COMMON)/rfb/librfb.a \
+ $(COMMON)/network/libnetwork.a \
+ $(COMMON)/rdr/librdr.a
EXTRA_LIBS = @ZLIB_LIB@ @JPEG_LIB@ @X_PRE_LIBS@ @X_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@ @LIBINTL@
-DIR_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir) -I$(top_srcdir)/tx -I$(top_srcdir)/intl @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
+DIR_CPPFLAGS = -I$(COMMON) -I$(TOP) -I$(TOP)/tx -I$(TOP)/intl -DLOCALEDIR=\"$(localedir)\" @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS
all:: $(program)
SRCS = Image.cxx TimeMillis.cxx PollingScheduler.cxx PollingManager.cxx \
Geometry.cxx \
- x0vncserver.cxx ../vncconfig_unix/QueryConnectDialog.cxx
+ x0vncserver.cxx ../vncconfig/QueryConnectDialog.cxx
OBJS = $(SRCS:.cxx=.o)
program = x0vncserver
-DEP_LIBS = ../rfb/librfb.a \
- ../network/libnetwork.a \
- ../rdr/librdr.a \
- ../tx/libtx.a
+DEP_LIBS = $(COMMON)/rfb/librfb.a \
+ $(COMMON)/network/libnetwork.a \
+ $(COMMON)/rdr/librdr.a \
+ $(TOP)/tx/libtx.a
EXTRA_LIBS = @ZLIB_LIB@ @JPEG_LIB@ @INET_LIB@ @X_PRE_LIBS@ @X_LIBS@ \
@XTEST_LIB@ -lXext -lX11 @X_EXTRA_LIBS@
# X_CFLAGS are really CPPFLAGS
-DIR_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tx -I$(top_srcdir)/vncconfig_unix \
+DIR_CPPFLAGS = -I$(COMMON) -I$(TOP) -I$(TOP)/tx -I$(TOP)/vncconfig \
@XTEST_DEFINE@ @READDISPLAY_DEFINE@ @MITSHM_DEFINE@ @X_CFLAGS@
all:: $(program)
#include <network/TcpSocket.h>
#include <tx/TXWindow.h>
-#include <vncconfig_unix/QueryConnectDialog.h>
+#include <vncconfig/QueryConnectDialog.h>
#include <signal.h>
#include <X11/X.h>