Build system should now work everywhere, including older autoconfs. I hope.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 28 Jun 2002 05:01:41 +0000
changeset 296 32658d27c62f
parent 295 ed85fbad677d
child 297 c60c35ec5f62
Build system should now work everywhere, including older autoconfs. I hope.
Makefile.am
configure.in
--- a/Makefile.am	Fri Jun 28 03:50:24 2002 +0000
+++ b/Makefile.am	Fri Jun 28 05:01:41 2002 +0000
@@ -1,6 +1,10 @@
 lib_LTLIBRARIES = libphysfs.la
 
-#SUBDIRS = platform archivers zlib114 . test extras
+libphysfsincludedir = $(includedir)
+libphysfsinclude_HEADERS =	\
+	physfs.h
+
+if BUILD_MACOSX
 
 ZLIB_FILES = zlib114/adler32.c		\
              zlib114/compress.c		\
@@ -46,11 +50,6 @@
   BEOS_EXTRADIST = platform/beos.cpp
 endif
 
-
-libphysfsincludedir = $(includedir)
-libphysfsinclude_HEADERS =	\
-	physfs.h
-
 libphysfs_la_SOURCES =	\
 	physfs.c	        \
 	physfs_internal.h	\
@@ -101,6 +100,44 @@
     extras/physfshttpd.c   \
     $(ZLIB_EXTRADIST) $(BEOS_EXTRADIST) $(TEST_EXTRADIST)
 
+else
+
+SUBDIRS = platform archivers zlib114 . test extras
+
+libphysfs_la_SOURCES =	\
+	physfs.c	\
+	physfs_internal.h	\
+	physfs_byteorder.c
+
+if BUILD_ZLIB
+ZLIB_LIB = zlib114/libz.la
+else
+ZLIB_LIB =
+endif
+
+libphysfs_la_LDFLAGS = 		\
+	-release $(LT_RELEASE)	\
+	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+libphysfs_la_LIBADD =	\
+	archivers/libarchivers.la	\
+	platform/libplatform.la	\
+	$(ZLIB_LIB)
+
+EXTRA_DIST =	\
+	CREDITS \
+	LICENSE \
+	CHANGELOG \
+	INSTALL \
+	TODO \
+	Doxyfile \
+	CWProjects.sit \
+	physfs.dsp \
+	test_physfs.dsp \
+    docs
+
+
+endif
+
 dist-hook:
 	rm -rf $(distdir)/docs/*
 	echo "Docs are generated with the program "Doxygen" (http://www.doxygen.org/)," >> $(distdir)/docs/README
--- a/configure.in	Fri Jun 28 03:50:24 2002 +0000
+++ b/configure.in	Fri Jun 28 05:01:41 2002 +0000
@@ -39,6 +39,7 @@
 AC_SUBST(LT_AGE)
 
 dnl Detect the canonical host and target build environment
+AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 
@@ -57,7 +58,7 @@
 AC_PROG_LN_S
 AC_LIBTOOL_WIN32_DLL 
 AC_PROG_LIBTOOL
-
+AC_CHECK_PROG(we_have_sed, sed, yes, no)
 
 dnl ---------------------------------------------------------------------
 dnl Debug mode?
@@ -192,9 +193,26 @@
   fi
 fi
 
-AC_CHECK_HEADER(be/kernel/OS.h, this_is_beos=yes)
-if test x$this_is_beos = xyes; then
+dnl AC_CHECK_HEADER(be/kernel/OS.h, this_is_beos=yes)
+AC_MSG_CHECKING([if this is BeOS])
+if test x$build_os = xbeos; then
+  this_is_beos=yes
   LIBS="$LIBS -lroot -lbe"
+else
+  this_is_beos=no
+fi
+
+AC_MSG_RESULT([$this_is_beos])
+
+this_is_macosx=no
+if test x$we_have_sed = xyes; then
+  AC_MSG_CHECKING([if this is MacOS X])
+  x=`echo $build_os |sed "s/darwin.*/darwin/"`
+  if test x$x = xdarwin -a x$build_vendor = xapple; then
+    this_is_macosx=yes
+  fi
+
+  AC_MSG_RESULT([$this_is_macosx])
 fi
 
 # Checks for header files.
@@ -217,10 +235,18 @@
 AM_CONDITIONAL(BUILD_ZLIB, test x$enable_internal_zlib = xyes)
 AM_CONDITIONAL(BUILD_TEST_PHYSFS, test x$enable_testprog = xyes)
 AM_CONDITIONAL(BUILD_BEOS_CPP, test x$this_is_beos = xyes)
+AM_CONDITIONAL(BUILD_MACOSX, test x$this_is_macosx = xyes)
 
 LDFLAGS="$LDFLAGS -no-undefined"
 
 AC_OUTPUT([
 Makefile
+archivers/Makefile
+platform/Makefile
+zlib114/Makefile
+test/Makefile
+extras/Makefile
 ])
 
+dnl end of configure.in ...
+