cpp-autoconf-located-20071019
authorArno Schuring <aelschuring@hotmail.com>
Sat, 20 Oct 2007 01:20:51 +0000 (01:20 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sat, 20 Oct 2007 01:20:51 +0000 (01:20 +0000)
let autoconf find cpp

configure.in
src/config/Makefile.config.in
src/libafsrpc/Makefile.in
src/lwp/Makefile.in
src/rxgen/Makefile.in
src/rxgen/rpc_main.c
src/shlibafsrpc/Makefile.in
src/sys/Makefile.in

index 4e46454..8919035 100644 (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
index 76860f4..d1514d1 100644 (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@
index d016752..c12388c 100644 (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
index 8b515ab..64bdb03 100644 (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
index 89ee06c..c528811 100644 (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
 #
index 483f17f..2ac8b4f 100644 (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
index eff85b6..e632eac 100644 (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
index 01d85fa..76684b0 100644 (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; \
                ;; \