--- xv-3.10a/Makefile.orig 2010-01-15 17:46:37.795696149 +0100 +++ xv-3.10a/Makefile 2010-01-15 17:45:30.765696388 +0100 @@ -1,7 +1,7 @@ # Makefile for xv # your C compiler (and options) of choice -CC = cc +CC = gcc #CC = gcc -ansi # note that -ansi kills __USE_MISC (gcc 2.95.3), which, at least on Linux, # determines whether stdlib.h includes prototypes for mktemp(), random(), etc. @@ -18,7 +18,7 @@ # -Wuninitialized -Wparentheses -CCOPTS = -O +CCOPTS = $(RPM_OPT_FLAGS) # # these are the usual optimization and warning options for gcc; all such # warnings but one (mktemp() use) have been eliminated (at least on Linux): @@ -56,7 +56,7 @@ ### NOTE: Users of old K&R compilers (i.e., any version not supporting C89 ### string concatenation, such as "fub" "ar" => "fubar") should update ### xvtext.c:1831 (or thereabouts) if either PREFIX or DOCDIR changes: -PREFIX = /usr/local +PREFIX = /usr BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man/man1 MANSUF = 1 @@ -87,17 +87,17 @@ TIFF = -DDOTIFF -DUSE_TILED_TIFF_BOTLEFT_FIX ### #TIFFDIR = tiff -TIFFDIR = /usr +#TIFFDIR = /usr #TIFFDIR = /usr/local #TIFFDIR = ../../libtiff ### -TIFFINC = -I$(TIFFDIR)/include +#TIFFINC = -I$(TIFFDIR)/include #TIFFINC = -I$(TIFFDIR) ### ### libtiff 3.5 and up may be compiled with zlib and libjpeg, but the ### dependency is properly handled in LIBS line ~247 lines below ### -TIFFLIB = -L$(TIFFDIR)/lib -ltiff +TIFFLIB = -ltiff #TIFFLIB = $(TIFFDIR)/lib/libtiff.a #TIFFLIB = -L$(TIFFDIR) -ltiff #TIFFLIB = $(TIFFDIR)/libtiff.a @@ -117,25 +117,13 @@ ### JPEG = -DDOJPEG #JPEGDIR = jpeg -JPEGDIR = /usr -#JPEGDIR = /usr/local -#JPEGDIR = ../../libjpeg -#JPEGDIR = /usr/sfw -### -JPEGINC = -I$(JPEGDIR)/include #JPEGINC = -I$(JPEGDIR) -### -JPEGLIB = -L$(JPEGDIR)/lib -ljpeg -#JPEGLIB = -L$(JPEGDIR) -ljpeg #JPEGLIB = $(JPEGDIR)/libjpeg.a -### -### this is intended to build the ancient version (5a) that's included in the -### "jpeg" subdir of XV, not an arbitrary copy of libjpeg: -### #$(JPEGDIR)/jconfig.h: # cd $(JPEGDIR) ; ./configure CC='$(CC)' #$(JPEGLIB): $(JPEGDIR)/jconfig.h # cd $(JPEGDIR) ; make +JPEGLIB = -ljpeg ### @@ -143,14 +131,14 @@ ### on your machine, *COMMENT OUT* the following lines ### PNG = -DDOPNG -PNGDIR = /usr +#PNGDIR = /usr #PNGDIR = /usr/local #PNGDIR = ../../libpng ### -PNGINC = -I$(PNGDIR)/include +#PNGINC = -I$(PNGDIR)/include #PNGINC = -I$(PNGDIR) ### -PNGLIB = -L$(PNGDIR)/lib -lpng +PNGLIB = -lpng #PNGLIB = -L$(PNGDIR) -lpng #PNGLIB = $(PNGDIR)/libpng.a @@ -160,14 +148,14 @@ ### (newer versions of) the TIFF library to compile on your machine, *COMMENT ### OUT* the following lines ### -ZLIBDIR = /usr +#ZLIBDIR = /usr #ZLIBDIR = /usr/local #ZLIBDIR = ../../zlib ### -ZLIBINC = -I$(ZLIBDIR)/include +#ZLIBINC = -I$(ZLIBDIR)/include #ZLIBINC = -I$(ZLIBDIR) ### -ZLIBLIB = -L$(ZLIBDIR)/lib -lz +ZLIBLIB = -lz #ZLIBLIB = -L$(ZLIBDIR) -lz #ZLIBLIB = $(ZLIBDIR)/libz.a @@ -179,13 +167,13 @@ JP2K = -DDOJP2K ### #JP2KDIR = ../../jasper -JP2KDIR = /usr/local/lib +#JP2KDIR = /usr/local/lib ### #JP2KINC = -I$(JP2KDIR) -JP2KINC = -I/usr/local/include +#JP2KINC = -I/usr/local/include ### -#JP2KLIB = -L$(JP2KDIR) -ljasper -JP2KLIB = $(JP2KDIR)/libjasper.a +JP2KLIB = -ljasper +#JP2KLIB = $(JP2KDIR)/libjasper.a ### @@ -236,7 +224,7 @@ ### for Linux, uncomment one of the following lines: -#MCHN = -DLINUX -L/usr/X11R6/lib +MCHN = -DLINUX #MCHN = -DLINUX -L/usr/X11R6/lib64 @@ -342,7 +330,7 @@ -DSYSCONFDIR=\"$(SYSCONFDIR)\" -DXVEXECPATH=\"$(LIBDIR)\" ### remove -lm for BeOS: -LIBS = $(TIFFLIB) $(JPEGLIB) $(PNGLIB) $(ZLIBLIB) $(JP2KLIB) -L/usr/X11R6/lib -lX11 -lm +LIBS = $(LDFLAGS) $(TIFFLIB) $(JPEGLIB) $(PNGLIB) $(ZLIBLIB) $(JP2KLIB) -lX11 -lm #LIBS = $(TIFFLIB) $(JPEGLIB) $(PNGLIB) $(ZLIBLIB) $(JP2KLIB) -lX11 OBJS = xv.o xvevent.o xvroot.o xvmisc.o xvimage.o xvcolor.o xvsmooth.o \