make dist fixed; make rpm introduced

pull/1/head
dscho 22 years ago
parent c3d51c32e1
commit 4f3ac987fb

@ -1,12 +1,24 @@
SUBDIRS=. examples contrib
DIST_SUBDIRS=examples contrib
bin_SCRIPTS = libvncserver-config
include_HEADERS=include/rfb.h include/rfbconfig.h include/rfbproto.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 \
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 \
stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
zlib.c tight.c httpd.c cursor.c font.c \
@ -19,3 +31,12 @@ libvncserver_a_SOURCES=$(LIB_SOURCES)
endif
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])
# Checks for programs.
AC_PROG_CC
CCLD=$CC
CCLD="\$(CC)"
AC_PROG_MAKE_SET
AC_PROG_RANLIB
@ -39,10 +39,12 @@ AC_CHECK_HEADERS(jpeglib.h pthread.h zlib.h)
if test ! -z "$HAVE_JPEGLIB.H"; then
AC_CHECK_LIB(jpeg, jpeg_CreateCompress)
fi
AM_CONDITIONAL(HAVE_LIBPTHREAD, test ! -z "$HAVE_PTHREAD.H")
if test ! -z "$HAVE_PTHREAD.H"; then
AC_CHECK_LIB(pthread, pthread_mutex_lock)
AC_CHECK_LIB(pthread, pthread_mutex_lock, HAVE_LIBPTHREAD="true")
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
AC_CHECK_LIB(z, deflate)
# check for c++, but don't fail if not found
@ -51,7 +53,7 @@ if test ! -z "$HAVE_ZLIB.H"; then
if test x$CXX != xnone; then
AC_DEFINE(HAVE_ZRLE)
AC_PROG_CXX
CCLD=$CXX
CCLD="\$(CXX)"
fi
else
CXX=none
@ -59,10 +61,6 @@ fi
AM_CONDITIONAL(HAVE_CXX, test x$CXX != xnone)
AC_SUBST(CCLD)
VNCLIBS="-L.. -lvncserver"
LIBS="$VNCLIBS $LIBS"
# Checks for header files.
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])
@ -79,10 +77,27 @@ AC_FUNC_MEMCMP
AC_FUNC_STAT
AC_FUNC_STRFTIME
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])
# 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
contrib/Makefile
examples/Makefile
libvncserver.spec])
libvncserver.spec
libvncserver-config])
AC_OUTPUT

@ -1,10 +1,13 @@
LDADD = -L.. -lvncserver
noinst_PROGRAMS=zippy
if HAVE_X
bin_PROGRAMS=x11vnc
x11vnc_SOURCES=x11vnc.c
x11vnc_CFLAGSADD=@X_CFLAGS@
x11vnc_LDADD=@X_LIBS@
INCLUDES=@X_CFLAGS@
x11vnc_LDADD=@X_LIBS@ $(LDADD)
endif
zippy_SOURCES=zippy.c

@ -2,5 +2,10 @@ if HAVE_LIBPTHREAD
BACKGROUND_TEST=blooptest
endif
noinst_HEADERS=radon.h
noinst_PROGRAMS=example pnmshow sratest pnmshow24 fontsel \
vncev storepasswd $(BACKGROUND_TEST)
LDADD = -L.. -lvncserver

@ -1,6 +1,7 @@
/* This program is a simple server to show events coming from the client */
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "rfb.h"
#include "default8x16.h"

@ -0,0 +1,64 @@
#!/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}
%files
%defattr(-,root,root)
%{prefix}
%{_mandir}/man1/*
%doc AUTHORS COPYING ChangeLog README TODO
%changelog
see ChangeLog
* Sun Feb 9 2003 Johannes Schindelin
- created libvncserver.spec.in

Loading…
Cancel
Save