Files
macports-ports/textproc/libsgml/files/patch-configure.in.diff
Ryan Schmidt b424f8f2cc libsgml: Use CC not CXX as the linker
This project contains no C++ code so use CC not CXX as the linker.

Use MacPorts CFLAGS, CPPFLAGS, LDFLAGS. Fixes universal variant among
other things.

Closes: https://trac.macports.org/ticket/62285

Also modernize checksums and update homepage.
2021-02-14 03:37:58 -06:00

31 lines
816 B
Diff

--- configure.in.orig 2003-03-24 02:48:21.000000000 -0600
+++ configure.in 2021-02-14 02:17:11.000000000 -0600
@@ -39,15 +39,22 @@
DEBUG="-O3"
fi
-if test "x$mmd_sys_os" = "xSolaris"; then
- LIBBIN="ld -dy -r -o ../libsgml.so \${OBJS}"
-else
- LIBBIN="\${CXX} \${DEBUG} -Wall -O3 -shared -fPIC -o ../libsgml.so \${OBJS}"
-fi
+case "$sys_os" in
+ Solaris)
+ LIBBIN="ld \${LDFLAGS} -dy -r -o ../libsgml.so \${OBJS}"
+ ;;
+ Darwin)
+ LIBBIN="\${CC} \${LDFLAGS} \${DEBUG} -dynamiclib -fPIC -o ../libsgml.dylib -install_name \${prefix}/lib/libsgml.dylib \${OBJS}"
+ ;;
+ *)
+ LIBBIN="\${CC} \${LDFLAGS} \${DEBUG} -shared -fPIC -o ../libsgml.so \${OBJS}"
+ ;;
+esac
AC_SUBST(LIBS)
AC_SUBST(DEFINES)
AC_SUBST(DEBUG)
AC_SUBST(LIBBIN)
+AC_SUBST(prefix)
AC_OUTPUT(Makefile src/Makefile examples/Makefile)