Incorporate Linux DSO changes and add autoheader protection (Issue #218)

parent a90ff175
......@@ -262,7 +262,7 @@ mxml-entity.o mxml-file.o mxml-private.o: mxml-private.h
mxml1.dll: $(LIBOBJS)
echo Creating $@...
$(DSO) $(DSOFLAGS) -o $@ $(LIBOBJS)
$(DSO) $(DSOFLAGS) $(LDFLAGS) -o $@ $(LIBOBJS) $(LIBS)
#
......@@ -271,7 +271,7 @@ mxml1.dll: $(LIBOBJS)
libmxml.so.1.6: $(LIBOBJS)
echo Creating $@...
$(DSO) $(DSOFLAGS) -o libmxml.so.1.6 $(LIBOBJS)
$(DSO) $(DSOFLAGS) $(LDFLAGS) -o libmxml.so.1.6 $(LIBOBJS) $(LIBS)
$(RM) libmxml.so libmxml.so.1
$(LN) libmxml.so.1.6 libmxml.so
$(LN) libmxml.so.1.6 libmxml.so.1
......@@ -283,7 +283,7 @@ libmxml.so.1.6: $(LIBOBJS)
libmxml.sl.1: $(LIBOBJS)
echo Creating $@...
$(DSO) $(DSOFLAGS) -o libmxml.sl.1 $(LIBOBJS)
$(DSO) $(DSOFLAGS) $(LDFLAGS) -o libmxml.sl.1 $(LIBOBJS) $(LIBS)
$(RM) libmxml.sl
$(LN) libmxml.sl.1 libmxml.sl
......@@ -294,11 +294,11 @@ libmxml.sl.1: $(LIBOBJS)
libmxml.1.dylib: $(LIBOBJS)
echo Creating $@...
$(DSO) $(DSOFLAGS) -o libmxml.1.dylib \
$(DSO) $(DSOFLAGS) $(LDFLAGS) -o libmxml.1.dylib \
-install_name $(libdir)/libmxml.dylib \
-current_version 1.6.0 \
-compatibility_version 1.0.0 \
$(LIBOBJS)
$(LIBOBJS) $(LIBS)
$(RM) libmxml.dylib
$(LN) libmxml.1.dylib libmxml.dylib
......
......@@ -2189,6 +2189,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
......@@ -4534,7 +4536,15 @@ $as_echo "yes" >&6; }
DSOFLAGS="$DSOFLAGS -Wl,-rpath,\$(libdir),-set_version,sgi1.0,-soname,libmxml.so.1 -shared \$(OPTIM)"
;;
osf | linux* | gnu)
linux*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
LIBMXML="libmxml.so.1.6"
DSO="\$(CC)"
DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1 -shared \$(OPTIM)"
;;
osf | gnu)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
LIBMXML="libmxml.so.1.6"
......
......@@ -15,6 +15,11 @@ dnl
dnl Package name and version...
AC_INIT([Mini-XML], [2.12], [https://github.com/michaelrsweet/mxml/issues], [mxml], [https://michaelrsweet.github.io/mxml])
dnl This line is provided to ensure that you don't run the autoheader program
dnl against this project. Doing so is completely unsupported and WILL cause
dnl problems!
AH_TOP([#error "Somebody ran autoheader on this project which is unsupported and WILL cause problems."])
dnl Get the build and host platforms and split the host_os value
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
......@@ -203,7 +208,14 @@ if test x$enable_shared != xno; then
DSOFLAGS="$DSOFLAGS -Wl,-rpath,\$(libdir),-set_version,sgi1.0,-soname,libmxml.so.1 -shared \$(OPTIM)"
;;
osf | linux* | gnu)
linux*)
AC_MSG_RESULT(yes)
LIBMXML="libmxml.so.1.6"
DSO="\$(CC)"
DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1 -shared \$(OPTIM)"
;;
osf | gnu)
AC_MSG_RESULT(yes)
LIBMXML="libmxml.so.1.6"
DSO="\$(CC)"
......
.TH mxml 3 "Mini-XML API" "07/02/18" "Mini-XML API"
.TH mxml 3 "Mini-XML API" "07/04/18" "Mini-XML API"
.SH NAME
mxml \- Mini-XML API
.SH INCLUDE FILE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment