Commit 4f3ac987 authored by dscho's avatar dscho

make dist fixed; make rpm introduced

parent c3d51c32
SUBDIRS=. examples contrib SUBDIRS=. examples contrib
DIST_SUBDIRS=examples contrib DIST_SUBDIRS=examples contrib
bin_SCRIPTS = libvncserver-config
include_HEADERS=include/rfb.h include/rfbconfig.h include/rfbproto.h \ include_HEADERS=include/rfb.h include/rfbconfig.h include/rfbproto.h \
include/keysym.h include/keysym.h
noinst_HEADERS=sraRegion.h d3des.h zrleDecode.h zrleEncode.h \
include/default8x16.h \
rdr/Exception.h rdr/FdInStream.h rdr/FdOutStream.h \
rdr/FixedMemOutStream.h rdr/InStream.h rdr/MemInStream.h \
rdr/MemOutStream.h rdr/NullOutStream.h rdr/OutStream.h \
rdr/ZlibInStream.h rdr/ZlibOutStream.h rdr/types.h
ZRLE_SRCS=zrle.cxx rdr/FdInStream.cxx rdr/FdOutStream.cxx rdr/InStream.cxx \ ZRLE_SRCS=zrle.cxx rdr/FdInStream.cxx rdr/FdOutStream.cxx rdr/InStream.cxx \
rdr/NullOutStream.cxx rdr/ZlibInStream.cxx rdr/ZlibOutStream.cxx rdr/NullOutStream.cxx rdr/ZlibInStream.cxx rdr/ZlibOutStream.cxx
EXTRA_DIST=tableinit24.c tableinittctemplate.c tabletranstemplate.c \
tableinitcmtemplate.c tabletrans24template.c $(ZRLE_SRCS)
LIB_SOURCES = main.c rfbserver.c sraRegion.c auth.c sockets.c \ LIB_SOURCES = main.c rfbserver.c sraRegion.c auth.c sockets.c \
stats.c corre.c hextile.c rre.c translate.c cutpaste.c \ stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
zlib.c tight.c httpd.c cursor.c font.c \ zlib.c tight.c httpd.c cursor.c font.c \
...@@ -19,3 +31,12 @@ libvncserver_a_SOURCES=$(LIB_SOURCES) ...@@ -19,3 +31,12 @@ libvncserver_a_SOURCES=$(LIB_SOURCES)
endif endif
lib_LIBRARIES=libvncserver.a lib_LIBRARIES=libvncserver.a
if HAVE_RPM
$(PACKAGE)-$(VERSION).tar.gz: dist
# Rule to build RPM distribution package
rpm: $(PACKAGE)-$(VERSION).tar.gz
cp $(PACKAGE)-$(VERSION).tar.gz @RPMSOURCEDIR@
rpm -ba libvncserver.spec
endif
...@@ -5,7 +5,7 @@ AM_CONFIG_HEADER([include/rfbconfig.h]) ...@@ -5,7 +5,7 @@ AM_CONFIG_HEADER([include/rfbconfig.h])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
CCLD=$CC CCLD="\$(CC)"
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
AC_PROG_RANLIB AC_PROG_RANLIB
...@@ -39,10 +39,12 @@ AC_CHECK_HEADERS(jpeglib.h pthread.h zlib.h) ...@@ -39,10 +39,12 @@ AC_CHECK_HEADERS(jpeglib.h pthread.h zlib.h)
if test ! -z "$HAVE_JPEGLIB.H"; then if test ! -z "$HAVE_JPEGLIB.H"; then
AC_CHECK_LIB(jpeg, jpeg_CreateCompress) AC_CHECK_LIB(jpeg, jpeg_CreateCompress)
fi fi
AM_CONDITIONAL(HAVE_LIBPTHREAD, test ! -z "$HAVE_PTHREAD.H")
if test ! -z "$HAVE_PTHREAD.H"; then if test ! -z "$HAVE_PTHREAD.H"; then
AC_CHECK_LIB(pthread, pthread_mutex_lock) AC_CHECK_LIB(pthread, pthread_mutex_lock)
AC_CHECK_LIB(pthread, pthread_mutex_lock, HAVE_LIBPTHREAD="true")
fi fi
#AM_CONDITIONAL(HAVE_LIBPTHREAD, test ! -z "$HAVE_PTHREAD.H")
AM_CONDITIONAL(HAVE_LIBPTHREAD, test ! -z "$HAVE_LIBPTHREAD")
if test ! -z "$HAVE_ZLIB.H"; then if test ! -z "$HAVE_ZLIB.H"; then
AC_CHECK_LIB(z, deflate) AC_CHECK_LIB(z, deflate)
# check for c++, but don't fail if not found # check for c++, but don't fail if not found
...@@ -51,7 +53,7 @@ if test ! -z "$HAVE_ZLIB.H"; then ...@@ -51,7 +53,7 @@ if test ! -z "$HAVE_ZLIB.H"; then
if test x$CXX != xnone; then if test x$CXX != xnone; then
AC_DEFINE(HAVE_ZRLE) AC_DEFINE(HAVE_ZRLE)
AC_PROG_CXX AC_PROG_CXX
CCLD=$CXX CCLD="\$(CXX)"
fi fi
else else
CXX=none CXX=none
...@@ -59,10 +61,6 @@ fi ...@@ -59,10 +61,6 @@ fi
AM_CONDITIONAL(HAVE_CXX, test x$CXX != xnone) AM_CONDITIONAL(HAVE_CXX, test x$CXX != xnone)
AC_SUBST(CCLD) AC_SUBST(CCLD)
VNCLIBS="-L.. -lvncserver"
LIBS="$VNCLIBS $LIBS"
# Checks for header files. # Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h]) AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h])
...@@ -79,10 +77,27 @@ AC_FUNC_MEMCMP ...@@ -79,10 +77,27 @@ AC_FUNC_MEMCMP
AC_FUNC_STAT AC_FUNC_STAT
AC_FUNC_STRFTIME AC_FUNC_STRFTIME
AC_FUNC_VPRINTF AC_FUNC_VPRINTF
AC_CHECK_LIB(nsl,gethostbyname)
AC_CHECK_LIB(socket,socket)
AC_CHECK_FUNCS([ftime gethostbyname gethostname gettimeofday inet_ntoa memmove memset mkfifo select socket strchr strcspn strdup strerror strstr]) AC_CHECK_FUNCS([ftime gethostbyname gethostname gettimeofday inet_ntoa memmove memset mkfifo select socket strchr strcspn strdup strerror strstr])
# Check for rpm SOURCES path
echo -n "checking for rpm sources path... "
RPMSOURCEDIR="NOT-FOUND"
for directory in packages OpenLinux redhat RedHat rpm RPM "" ; do
if test -d /usr/src/${directory}/SOURCES; then
RPMSOURCEDIR="/usr/src/${directory}/SOURCES/"
fi
done
echo "$RPMSOURCEDIR"
AM_CONDITIONAL(HAVE_RPM, test "$RPMSOURCEDIR" != "NOT-FOUND")
AC_SUBST(RPMSOURCEDIR)
LDADD="-L.. -lvncserver"
AC_CONFIG_FILES([Makefile AC_CONFIG_FILES([Makefile
contrib/Makefile contrib/Makefile
examples/Makefile examples/Makefile
libvncserver.spec]) libvncserver.spec
libvncserver-config])
AC_OUTPUT AC_OUTPUT
LDADD = -L.. -lvncserver
noinst_PROGRAMS=zippy noinst_PROGRAMS=zippy
if HAVE_X if HAVE_X
bin_PROGRAMS=x11vnc bin_PROGRAMS=x11vnc
x11vnc_SOURCES=x11vnc.c x11vnc_SOURCES=x11vnc.c
x11vnc_CFLAGSADD=@X_CFLAGS@ INCLUDES=@X_CFLAGS@
x11vnc_LDADD=@X_LIBS@ x11vnc_LDADD=@X_LIBS@ $(LDADD)
endif endif
zippy_SOURCES=zippy.c zippy_SOURCES=zippy.c
...@@ -2,5 +2,10 @@ if HAVE_LIBPTHREAD ...@@ -2,5 +2,10 @@ if HAVE_LIBPTHREAD
BACKGROUND_TEST=blooptest BACKGROUND_TEST=blooptest
endif endif
noinst_HEADERS=radon.h
noinst_PROGRAMS=example pnmshow sratest pnmshow24 fontsel \ noinst_PROGRAMS=example pnmshow sratest pnmshow24 fontsel \
vncev storepasswd $(BACKGROUND_TEST) vncev storepasswd $(BACKGROUND_TEST)
LDADD = -L.. -lvncserver
/* This program is a simple server to show events coming from the client */ /* This program is a simple server to show events coming from the client */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include "rfb.h" #include "rfb.h"
#include "default8x16.h" #include "default8x16.h"
......
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
usage="\
Usage: @PACKAGE@-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo @VERSION@
;;
--cflags)
if test @includedir@ != /usr/include ; then
includes=-I@includedir@
fi
echo $includes
;;
--libs)
if [ "`uname`" = "SunOS" ]; then
libdirs="-L@libdir@ -R@libdir@"
else
libdirs="-L@libdir@"
fi
echo $libdirs -lvncserver @LIBS@
;;
--link)
echo @CCLD@
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done
...@@ -51,8 +51,8 @@ make install prefix=$RPM_BUILD_ROOT%{prefix} ...@@ -51,8 +51,8 @@ make install prefix=$RPM_BUILD_ROOT%{prefix}
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{prefix} %{prefix}
%{_mandir}/man1/*
%doc AUTHORS COPYING ChangeLog README TODO
%changelog %changelog
see ChangeLog * Sun Feb 9 2003 Johannes Schindelin
- created libvncserver.spec.in
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment