initial-afsconfig-h-file-20010514
authorNathan Neulinger <nneul@umr.edu>
Mon, 14 May 2001 23:23:12 +0000 (23:23 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 14 May 2001 23:23:12 +0000 (23:23 +0000)
start of config file work for autoconf

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

make Makefile use top-level location rather than config as Nathan intended

src/Makefile
src/afsconfig.h.in [new file with mode: 0644]
src/afsd/Makefile
src/afsd/afsd.c

index fcf927f..14b593e 100644 (file)
@@ -36,7 +36,7 @@ WITH_DEPRECATED=YES
 
 all:
        set ${SYS_NAME}/dest; $(MKDIR_IF_NEEDED)
-       $(MAKE) install "COMPILE_PART1=cd obj; cd" "COMPILE_PART2=; $(MAKE) install SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ SRCDIR=`pwd`/${SYS_NAME}/dest/" "COMPILE_PART3=; $(MAKE) test SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ SRCDIR=`pwd`/${SYS_NAME}/dest/" SYS_NAME=${SYS_NAME} "WASHTOOL=echo No washtool: "
+       $(MAKE) install "COMPILE_PART1=cd obj; cd" "COMPILE_PART2=; $(MAKE) install SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ SRCDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=`pwd`/${SYS_NAME}/obj" "COMPILE_PART3=; $(MAKE) test SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ SRCDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=`pwd`/${SYS_NAME}/obj" SYS_NAME=${SYS_NAME} "WASHTOOL=echo No washtool: "
 
 basics:
        -if test -f "${WASHTOOL}"; \
@@ -523,7 +523,12 @@ links:
        cd src; \
        for file in `find [!NW]* -type f -print` ; do \
                /bin/ln -s `pwd`/$${file} $${here}/obj/$${file} ; \
-       done;
+       done; \
+       /bin/ln -s $${here}/obj/afsconfig.h.in $${here}/obj/config/afsconfig.h ;
+
+# config.h link will eventually be replaced with generating the file 
+# directly from config.h.in via configure run. I'm linking instead of
+# copying to ease development for now
 
 #
 # Below targets are all deprecated, insecure, or obsolte, 
diff --git a/src/afsconfig.h.in b/src/afsconfig.h.in
new file mode 100644 (file)
index 0000000..5f8e265
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ *  This is a template config.h.in, it is not truly a config.h.in at the moment
+ *  but will be converted to one during autoconf switch. The defines below
+ *  are all static and hardcoded purely to aid in the cleanup and migration
+ *  process.
+ *
+ */
+
+#ifndef AFSCONFIG_H
+#define AFSCONFIG_H
+
+#define HAVE_STDLIB_H
+#define HAVE_STRING_H
+
+#ifdef AFS_NT40_ENV
+#define HAVE_MALLOC_H
+#define HAVE_WINSOCK2_H
+#define HAVE_DIRECT_H
+#define HAVE_IO_H
+#endif
+
+#ifndef AFS_NT40_ENV
+#define HAVE_UNISTD_H
+#define HAVE_FCNTL_H
+#endif
+
+#ifdef AFS_SUN5_ENV
+#define HAVE_SYS_FCNTL_H
+#define HAVE_SYS_MNTTAB_H
+#define HAVE_SYS_MNTENT_H
+#endif
+
+#if defined(AFS_SUN_ENV) || defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV)
+#define HAVE_MNTENT_H
+#endif
+
+#if defined(AFS_OSF_ENV) || defined(AFS_DEC_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#define HAVE_SYS_MOUNT_H
+#else
+#define HAVE_SYS_VFS_H
+#endif
+
+#ifdef AFS_DEC_ENV
+#define HAVE_SYS_PARAM_H
+#define HAVE_SYS_FS_TYPES_H
+#endif
+
+#ifdef AFS_AIX41_ENV
+#define HAVE_SYS_MOUNT_H
+#endif
+
+#endif /* AFSCONFIG_H */
index 6dd79b0..454b0e1 100644 (file)
@@ -19,7 +19,7 @@ include ../config/Makefile.version
 
 INSTALLro = ${INSTALL} -m 644
 INSTALLex = ${INSTALL} -m 755
-CFLAGS = -g -I${SRCDIR}include ${XCFLAGS}
+CFLAGS = -g -I${TOP_SRCDIR}/config -I${SRCDIR}include ${XCFLAGS}
 LDFLAGS = -g ${XLDFLAGS}
 
 noversion: install
index 9c76118..6962f33 100644 (file)
@@ -54,6 +54,7 @@
 #define VFS 1
 
 #include <afs/param.h>
+#include "afsconfig.h"
 #include <afs/cmd.h>
 
 #include <assert.h>
 #include <sys/file.h>
 #include <errno.h>
 #include <sys/time.h>
-#ifdef AFS_DEC_ENV
+#include <dirent.h>
+
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
-#include <sys/fs_types.h>
 #endif
-#if    defined(AFS_SUN_ENV)
-#include <sys/vfs.h>
+
+#ifdef HAVE_SYS_FS_TYPES_H
+#include <sys/fs_types.h>
 #endif
-#ifndef        AFS_AIX41_ENV
+
+#ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif
-#include <dirent.h>
-#ifdef   AFS_SUN5_ENV
+
+#ifdef HAVE_SYS_FCNTL_H
 #include <sys/fcntl.h>
+#endif
+
+#ifdef HAVE_SYS_MNTTAB_H
 #include <sys/mnttab.h>
+#endif
+
+#ifdef HAVE_SYS_MNTENT_H
 #include <sys/mntent.h>
-#else
-#if    defined(AFS_SUN_ENV) || defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV)
-#include <mntent.h>
 #endif
+
+#ifdef HAVE_MNTENT_H
+#include <mntent.h>
 #endif
 
-#if defined(AFS_OSF_ENV) || defined(AFS_DEC_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
-#else
+#endif
+
+#ifdef HAVE_SYS_VFS_H
 #include <sys/vfs.h>
 #endif