mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Added configure parameter --enable-mclib for build own shared library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
c0637dcb27
commit
06f99484de
23
configure.ac
23
configure.ac
@ -11,6 +11,11 @@ AC_CONFIG_AUX_DIR(config)
|
|||||||
MC_VERSION
|
MC_VERSION
|
||||||
AM_INIT_AUTOMAKE(mc, ${VERSION} )
|
AM_INIT_AUTOMAKE(mc, ${VERSION} )
|
||||||
|
|
||||||
|
LIBMC_VERSION="0.0.1"
|
||||||
|
LIBMC_RELEASE="1"
|
||||||
|
AC_SUBST(LIBMC_VERSION)
|
||||||
|
AC_SUBST(LIBMC_RELEASE)
|
||||||
|
|
||||||
dnl Enable silent rules by default (if yes)
|
dnl Enable silent rules by default (if yes)
|
||||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
@ -45,6 +50,24 @@ dnl PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
|
|||||||
|
|
||||||
AC_CHECK_GLIB
|
AC_CHECK_GLIB
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([mclib],
|
||||||
|
[AS_HELP_STRING([--enable-mclib],[ Compile shared library libmc.so [no]])],
|
||||||
|
[
|
||||||
|
if test "x$enableval" = "xno" ; then
|
||||||
|
enable_mclib=no
|
||||||
|
else
|
||||||
|
if test "x$enable_shared" = "xno" ; then
|
||||||
|
AC_MSG_WARN([Build of shared library is disabled. Specify --enable-shared first])
|
||||||
|
enable_mclib=no
|
||||||
|
else
|
||||||
|
enable_mclib=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[enable_mclib=no])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([ENABLE_MCLIB], [test x$enable_mclib = xyes])
|
||||||
|
|
||||||
AC_HEADER_MAJOR
|
AC_HEADER_MAJOR
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
SUBDIRS = event filehighlight mcconfig search skin tty vfs strutil widget
|
SUBDIRS = event filehighlight mcconfig search skin tty vfs strutil widget
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libmc.la
|
if ENABLE_MCLIB
|
||||||
|
LIB_VERSION=`echo $(LIBMC_VERSION) | \
|
||||||
|
tr '.' ' '| \
|
||||||
|
while read v1 v2 v3; do echo $$v2':'$$v3':'$$v1; done`
|
||||||
|
|
||||||
|
libmc_la_LDFLAGS=-no-undefined -version-info $(LIB_VERSION) -release $(LIBMC_RELEASE)
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libmc.la
|
||||||
|
else
|
||||||
|
noinst_LTLIBRARIES = libmc.la
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
SUBLIB_includes = \
|
SUBLIB_includes = \
|
||||||
event.h event-types.h \
|
event.h event-types.h \
|
||||||
@ -50,3 +61,14 @@ libmc_la_LIBADD = \
|
|||||||
tty/libmctty.la \
|
tty/libmctty.la \
|
||||||
vfs/libmcvfs.la \
|
vfs/libmcvfs.la \
|
||||||
widget/libmcwidget.la
|
widget/libmcwidget.la
|
||||||
|
|
||||||
|
libmc_la_LIBADD += $(MCLIBS) $(SLANGLIB)
|
||||||
|
|
||||||
|
if HAVE_GMODULE
|
||||||
|
libmc_la_LIBADD += $(GMODULE_LIBS)
|
||||||
|
else
|
||||||
|
libmc_la_LIBADD += $(GLIB_LIBS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) $(INTLLIBS)
|
||||||
|
|
||||||
|
@ -35,23 +35,13 @@ mc_LDADD = \
|
|||||||
viewer/libmcviewer.la \
|
viewer/libmcviewer.la \
|
||||||
filemanager/libmcfilemanager.la \
|
filemanager/libmcfilemanager.la \
|
||||||
$(DIFFLIB) $(EDITLIB) \
|
$(DIFFLIB) $(EDITLIB) \
|
||||||
../lib/libmc.la
|
$(top_builddir)/lib/libmc.la
|
||||||
|
|
||||||
if ENABLE_VFS_SMB
|
if ENABLE_VFS_SMB
|
||||||
# this is a hack for linking with own samba library in simple way
|
# this is a hack for linking with own samba library in simple way
|
||||||
mc_LDADD += vfs/smbfs/helpers/libsamba.a
|
mc_LDADD += vfs/smbfs/helpers/libsamba.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
mc_LDADD += $(MCLIBS) $(SLANGLIB)
|
|
||||||
|
|
||||||
if HAVE_GMODULE
|
|
||||||
mc_LDADD += $(GMODULE_LIBS)
|
|
||||||
else
|
|
||||||
mc_LDADD += $(GLIB_LIBS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
mc_LDADD += $(PCRE_LIBS) $(LIBICONV) $(INTLLIBS)
|
|
||||||
|
|
||||||
SRC_mc_conssaver = \
|
SRC_mc_conssaver = \
|
||||||
cons.handler.c consaver/cons.saver.h
|
cons.handler.c consaver/cons.saver.h
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user