+2002-08-18 Theodore Ts'o <tytso@mit.edu>
+
+ * configure.in, configure: Add new substitution variable,
+ LINUX_CMT, which is '' on Linux systems, and '#' on
+ non-Linux systems.
+
+ * Makefile.in: On Linux systems, build lib/evms.
+
2002-07-14 Theodore Ts'o <tytso@mit.edu>
* configure.in, configure: Remove test for the presence (or
@RESIZER_CMT@RESIZE_DIR= resize
@DEBUGFS_CMT@DEBUGFS_DIR= debugfs
+@LINUX_CMT@EVMS_DIR= lib/evms
LIB_SUBDIRS=lib/et lib/ss lib/e2p lib/ext2fs lib/uuid # lib/finddev
-PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs
+PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs $(EVMS_DIR)
SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
SUBS= lib/ext2fs/ext2_types.h
;;
esac
+LINUX_CMT="#"
+case "$host_os" in
+linux*)
+ LINUX_CMT=
+ ;;
+esac
+
case "$host_os" in
linux* | gnu*)
if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
echo $ac_n "checking whether linker accepts -static""... $ac_c" 1>&6
-echo "configure:4837: checking whether linker accepts -static" >&5
+echo "configure:4844: checking whether linker accepts -static" >&5
if eval "test \"`echo '$''{'ac_cv_e2fsprogs_use_static'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static"
cat > conftest.$ac_ext <<EOF
-#line 4843 "configure"
+#line 4850 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
fflush(stdout);
; return 0; }
EOF
-if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_e2fsprogs_use_static=yes
else
s%@SIZEOF_LONG@%$SIZEOF_LONG%g
s%@SIZEOF_LONG_LONG@%$SIZEOF_LONG_LONG%g
s%@SOCKET_LIB@%$SOCKET_LIB%g
+s%@LINUX_CMT@%$LINUX_CMT%g
s%@root_prefix@%$root_prefix%g
s%@root_bindir@%$root_bindir%g
s%@root_sbindir@%$root_sbindir%g
;;
esac
dnl
+dnl Uncomment only if Linux
+dnl
+LINUX_CMT="#"
+case "$host_os" in
+linux*)
+ LINUX_CMT=
+ ;;
+esac
+AC_SUBST(LINUX_CMT)
+dnl
dnl Linux and Hurd places root files in the / by default
dnl
case "$host_os" in
2002-08-18 Theodore Ts'o <tytso@mit.edu>
+ * Makefile.in: Revamp makefile so that it doesn't depend
+ --enable-elf-shlibs. We always build the shared library,
+ since it's meant to be used as a plugin library.
+
* fs_ext2.c (fs_fsck, fs_shrink, fs_expand): Change to use new
calling convention of fsim_fsck. Fixed bug in fs_shrink
and f_expand where the shrink or expand would get aborted
MAJOR_VERSION = 1
MINOR_VERSION = 1
-PATCH_LEVEL = 0
+PATCH_LEVEL = 1
EXTRAVERSION =
XTRA_CFLAGS= -I@srcdir@ -DMAJOR_VERSION=$(MAJOR_VERSION) -DMINOR_VERSION=$(MINOR_VERSION) -DPATCH_LEVEL=$(PATCH_LEVEL)
ELF_SO_VERSION = $(MAJOR_VERSION)
ELF_IMAGE = libe2fsim
ELF_MYDIR = evms
-ELF_INSTALL_DIR = $(root_libdir)
+ELF_INSTALL_DIR = $(root_libdir)/evms
#ELF_OTHER_LIBS = -L../.. -lcom_err
-@MAKEFILE_LIBRARY@
-@MAKEFILE_ELF@
+ELF_LIB = $(ELF_IMAGE).$(ELF_VERSION).so
+ELF_SONAME = $(ELF_IMAGE).$(ELF_SO_VERSION).so
+
+all:: $(ELF_LIB)
+
+$(ELF_LIB): $(OBJS)
+ $(CC) --shared -o $(ELF_LIB) -Wl,-soname,$(ELF_SONAME) \
+ $(OBJS) $(ELF_OTHER_LIBS)
+
+installdirs::
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(ELF_INSTALL_DIR)
+
+install:: $(ELF_LIB) installdirs
+ $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+ $(STRIP) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+
+uninstall-shlibs uninstall::
+ $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+
+clean::
+ $(RM) -f $(ELF_LIB)
+ $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
.c.o:
- $(CC) $(ALL_CFLAGS) -c $< -o $@
-@ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
+ $(CC) $(ALL_CFLAGS) -fPIC -c $< -o $@
clean::
$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*