cpp-autoconf-located-20071019

let autoconf find cpp
This commit is contained in:
Arno Schuring 2007-10-20 01:20:51 +00:00 committed by Derrick Brashear
parent 7e752ba085
commit 6122c757e1
8 changed files with 19 additions and 20 deletions

View File

@ -6,6 +6,7 @@ MACOS_VERSION=9.9.99
AC_SUBST(MACOS_VERSION)
AC_PROG_CC
AC_PROG_CPP
OPENAFS_CONFIGURE_COMMON
if test -d 'doc/man-pages' ; then

View File

@ -33,6 +33,7 @@ AS = @AS@
AFSD_LIBS = @AFSD_LIBS@
AFSD_LDFLAGS = @AFSD_LDFLAGS@
CC = @CC@
CPP = @CPP@
CCOBJ = @CCOBJ@
CCXPG2 = @CCXPG2@
CFLAGS = @CFLAGS@

View File

@ -356,7 +356,7 @@ fasttime.o: ${LWP}/fasttime.c
syscall.o: ${SYS}/syscall.s
case "$(SYS_NAME)" in \
sun4x_5* | sunx86_5*) \
/usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
$(CPP) ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
sgi_* | *_darwin_* ) \
@ -368,7 +368,7 @@ syscall.o: ${SYS}/syscall.s
*bsd* ) \
touch syscall.o ;; \
*) \
/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
$(CPP) ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
esac

View File

@ -54,7 +54,7 @@ process.s:
process.o : process.s process.i386.s process.c
@set -x; case "$(SYS_NAME)" in \
sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5* ) \
/usr/ccs/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
$(CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
${AS} process.ss -o process.o; \
$(RM) process.ss ;; \
sgi_5* ) \
@ -62,11 +62,11 @@ process.o : process.s process.i386.s process.c
sgi_61 | sgi_62 | sgi_63 ) \
$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} ${ARCHFLAGS} -I${TOP_INCDIR} -KPIC -G0 ${srcdir}/process.s;; \
s390_*) \
/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390.s >process.ss; \
$(CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s390.s >process.ss; \
${AS} -ahlns process.ss -o process.o >process.lst; \
$(RM) process.ss ;; \
s390x_*) \
/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390x.s >process.ss; \
$(CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s390x.s >process.ss; \
${AS} -ahlns process.ss -o process.o >process.lst; \
$(RM) process.ss ;; \
*_darwin* ) \
@ -105,11 +105,11 @@ process.o : process.s process.i386.s process.c
${AS} process.ss -o process.o ; \
$(RM) -f process.S ;;\
ncrx86_* | sunx86_*) \
/usr/ccs/lib/cpp -P -D__sun -D__i386 -DIGNORE_STDS_H -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
$(CPP) -P -D__sun -D__i386 -DIGNORE_STDS_H -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
${AS} -o process.o process.ss; \
$(RM) process.ss ;; \
alpha_nbsd* ) \
/usr/bin/cpp -DASSEMBLER -P -I${TOP_INCDIR} ${srcdir}/process.s > process.ss; \
$(CPP) -DASSEMBLER -P -I${TOP_INCDIR} ${srcdir}/process.s > process.ss; \
${AS} -o process.o process.ss; \
$(RM) process.ss ;; \
hp* | *_linux* | *_umlinux* | sgi_64 | sgi_65 ) \
@ -120,11 +120,11 @@ process.o : process.s process.i386.s process.c
ia64_hpux11* | hp_ux11* ) \
${CC} ${CFLAGS} -c ${srcdir}/process.c;; \
i386_*) \
/lib/cpp -P -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
$(CPP) -P -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
${AS} process.ss -o process.o; \
$(RM) process.ss ;; \
*) \
/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
$(CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
${AS} process.ss -o process.o; \
$(RM) process.ss ;; \
esac

View File

@ -25,6 +25,9 @@ ${TOP_INCDIR}/afs/rxgen_consts.h: rxgen_consts.h
rxgen: $(OBJS) AFS_component_version_number.c $(HDRS)
$(CC) $(CFLAGS) $(OBJS) $(XLIBS) -o $@
rpc_main.o: rpc_main.c
$(CCOBJ) $(CFLAGS) -c $< -D__PROG_CPP__="\"$(CPP)\""
#
# Install targets
#

View File

@ -98,14 +98,8 @@ char xflag = 0; /* if set, add stats code to stubs */
char yflag = 0; /* if set, only emit function name arrays to xdr file */
int debug = 0;
static char *cmdname;
#ifdef AFS_SUN5_ENV
static char CPP[] = "/usr/ccs/lib/cpp";
#elif defined(AFS_XBSD_ENV) || defined(AFS_DARWIN60_ENV)
static char CPP[] = "/usr/bin/cpp";
#elif defined(AFS_NT40_ENV)
static char CPP[MAXCMDLINE];
#elif defined(AFS_DARWIN_ENV)
static char CPP[] = "cc -E";
#ifdef __PROG_CPP__
static char CPP[] = __PROG_CPP__;
#else
static char CPP[] = "/lib/cpp";
#endif

View File

@ -366,7 +366,7 @@ fasttime.o: ${LWP}/fasttime.c
syscall.o: ${SYS}/syscall.s
case "$(SYS_NAME)" in \
sun4x_5* | sunx86_5*) \
/usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
$(CPP) ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
sgi_* | *_darwin_* ) \
@ -378,7 +378,7 @@ syscall.o: ${SYS}/syscall.s
*fbsd* ) \
touch syscall.o ;; \
*) \
/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
$(CPP) ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
esac

View File

@ -99,7 +99,7 @@ syscall.o: syscall.s
${CC} ${CFLAGS} -c ${SYS}/syscall.s; \
;; \
rs_aix* | hp_ux10*) \
/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
$(CPP) -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss; \
;; \