Skip to content

Commit

Permalink
Incorporate Linux DSO changes and add autoheader protection (Issue #218)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Jul 4, 2018
1 parent a90ff17 commit ba3cca8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)


#
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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

Expand Down
12 changes: 11 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
14 changes: 13 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)"
Expand Down
2 changes: 1 addition & 1 deletion doc/mxml.man
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.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
Expand Down

0 comments on commit ba3cca8

Please sign in to comment.