pkgsrc/www/analog/patches/patch-aa

46 lines
2 KiB
Text
Raw Normal View History

$NetBSD: patch-aa,v 1.7 2000/02/23 18:31:58 tron Exp $
--- Makefile.orig Sat Feb 12 19:18:08 2000
+++ Makefile Wed Feb 23 19:20:12 2000
@@ -2,10 +2,14 @@
# Please read docs/Readme.html, or http://www.statslab.cam.ac.uk/~sret1/analog/
CC = gcc # which compiler to use: eg cc, acc, gcc. NB Different
# compilers need different CFLAGS, e.g., -O instead of -O2.
-CEXTRAFLAGS = -O2 # options, e.g. for optimisation or ANSI compilation.
+#CEXTRAFLAGS = -O2 # options, e.g. for optimisation or ANSI compilation.
# HP/UX cc requires CEXTRAFLAGS = -Aa (HP/UX 9) or ...
# -Ae (HP/UX 10); BS2000/OSD requires -XLLML -XLLMK
-DEFS = # any of -DNOPIPES -DNODNS -DNODIRENT -DNOOPEN -DNOREGEX ...
+DEFS = -DANALOGDIR=\"${PREFIX}/lib/analog/\" \
+ -DLOGFILE=\"/var/log/httpd-access.log\" \
+ -DIMAGEDIR=\"/images/\" \
+ -DDEFAULTCONFIGFILE=\"${PREFIX}/etc/analog.cfg\"
+ # any of -DNOPIPES -DNODNS -DNODIRENT -DNOOPEN -DNOREGEX ...
# ... -DEBCDIC -DNOGMTIME -DNEED_STRCMP -DNEED_MEMMOVE ...
# ... -DNEED_STRTOUL -DNEED_DIFFTIME -DNEED_FLOATINGPOINT_H
# Solaris 2 (SunOS 5) might need DEFS = -DNEED_STRCMP
@@ -22,15 +26,21 @@
# SVR4 requires LIBS = -lsocket -lnsl
# DYNIX/ptx requires LIBS = -L/usr/lib/bsd-socket -lsocket -lnsl
+OPSYS!= uname -s
+
+.if ${OPSYS} == "SunOS"
+LIBS+= -lsocket -lnsl
+.endif
+
PROGRAM = analog
OBJS = alias.o analog.o cache.o dates.o globals.o hash.o init.o init2.o \
input.o macinput.o macstuff.o output.o output2.o process.o settings.o \
sort.o tree.o utils.o win32.o
HEADERS = anlghead.h anlghea2.h anlghea3.h anlghea4.h macdir.h
-CFLAGS = $(CEXTRAFLAGS) $(DEFS) -D$(OS)
+CFLAGS += $(DEFS) -D$(OS)
$(PROGRAM): $(OBJS) $(HEADERS) Makefile
- $(CC) $(CEXTRAFLAGS) $(OBJS) -o $(PROGRAM) $(LIBS)
+ $(CC) $(OBJS) -o $(PROGRAM) $(LIBS)
@echo '***'
@echo '***IMPORTANT: You must read the licence before using analog'
@echo '***'