mirror of
https://github.com/troglobit/libite.git
synced 2026-10-03 06:03:11 +07:00
Fix #18: optional compat symlink lite -> libite/
Default is to create the symlink, to facilitate upgrades. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+8
-2
@@ -27,7 +27,13 @@ DX_CHM_FEATURE(OFF)
|
||||
DX_HTML_FEATURE(ON)
|
||||
DX_MAN_FEATURE(OFF)
|
||||
DX_INIT_DOXYGEN(${PACKAGE_NAME}, [${top_builddir}/doc/Doxyfile], [${top_builddir}/doc])
|
||||
AM_CONDITIONAL(ENABLE_DOXYGEN,[test "x${DX_FLAG_doc}" = x1])
|
||||
AM_CONDITIONAL(ENABLE_HTML,[test "x${DX_FLAG_html}" = x1])
|
||||
|
||||
AC_ARG_WITH([symlink],
|
||||
AS_HELP_STRING([--without-symlink], [Disable compat /usr/include/lite -> libite symlink]),,
|
||||
[with_symlink=yes])
|
||||
|
||||
AM_CONDITIONAL([ENABLE_DOXYGEN], [test "x${DX_FLAG_doc}" = x1])
|
||||
AM_CONDITIONAL([ENABLE_HTML], [test "x${DX_FLAG_html}" = x1])
|
||||
AM_CONDITIONAL([COMPAT_SYMLINK], [test "x$with_symlink" != "xno"])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -28,3 +28,18 @@ pkginclude_HEADERS = lite.h queue.h conio.h tree.h strlite.h strdupa.h \
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libite.pc
|
||||
|
||||
## For compatibility with existing installations that look for lite/lite.h
|
||||
if COMPAT_SYMLINK
|
||||
install-data-hook:
|
||||
link=$(DESTDIR)$(includedir)/lite; \
|
||||
if [ ! -f $$link ]; then \
|
||||
$(LN_S) libite $$link; \
|
||||
fi
|
||||
|
||||
uninstall-hook:
|
||||
link=$(shell readlink $(DESTDIR)$(includedir)/lite); \
|
||||
if [ "$$link" = "libite" ]; then \
|
||||
$(RM) $(DESTDIR)$(includedir)/lite; \
|
||||
fi
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user