Skip to content

Commit

Permalink
Build system should now work everywhere, including older autoconfs. I…
Browse files Browse the repository at this point in the history
… hope.
  • Loading branch information
icculus committed Jun 28, 2002
1 parent ffb3f01 commit 8b4c237
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 9 deletions.
49 changes: 43 additions & 6 deletions Makefile.am
@@ -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 \
Expand Down Expand Up @@ -46,11 +50,6 @@ else
BEOS_EXTRADIST = platform/beos.cpp
endif


libphysfsincludedir = $(includedir)
libphysfsinclude_HEADERS = \
physfs.h

libphysfs_la_SOURCES = \
physfs.c \
physfs_internal.h \
Expand Down Expand Up @@ -101,6 +100,44 @@ EXTRA_DIST = \
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
Expand Down
32 changes: 29 additions & 3 deletions configure.in
Expand Up @@ -39,6 +39,7 @@ AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

dnl Detect the canonical host and target build environment
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET

Expand All @@ -57,7 +58,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL

AC_CHECK_PROG(we_have_sed, sed, yes, no)

dnl ---------------------------------------------------------------------
dnl Debug mode?
Expand Down Expand Up @@ -192,9 +193,26 @@ if test x$enable_readline = xyes; then
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.
Expand All @@ -217,10 +235,18 @@ dnl Add Makefile conditionals
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 ...

0 comments on commit 8b4c237

Please sign in to comment.