mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-17 06:04:23 +03:00
Fix shared format1 build.
This commit is contained in:
parent
3aa078436a
commit
d68a82ecbd
19
configure
vendored
19
configure
vendored
@ -309,7 +309,7 @@ ac_includes_default="\
|
|||||||
#endif"
|
#endif"
|
||||||
|
|
||||||
ac_default_prefix=/usr
|
ac_default_prefix=/usr
|
||||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MSGFMT JOBS STATIC_LINK LVM1 OWNER GROUP CLDFLAGS CLDWHOLEARCHIVE CLDNOWHOLEARCHIVE LD_DEPS SOFLAG LVM_VERSION DEBUG DEVMAPPER HAVE_LIBDL CMDLIB LOCALEDIR INTL_PACKAGE INTL LIBOBJS LTLIBOBJS'
|
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MSGFMT JOBS STATIC_LINK LVM1 OWNER GROUP CLDFLAGS CLDWHOLEARCHIVE CLDNOWHOLEARCHIVE LD_DEPS LD_FLAGS SOFLAG LVM_VERSION DEBUG DEVMAPPER HAVE_LIBDL CMDLIB LOCALEDIR INTL_PACKAGE INTL LIBOBJS LTLIBOBJS'
|
||||||
ac_subst_files=''
|
ac_subst_files=''
|
||||||
|
|
||||||
# Initialize some variables set by options.
|
# Initialize some variables set by options.
|
||||||
@ -3885,6 +3885,7 @@ case "$host_os" in
|
|||||||
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||||
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||||
LD_DEPS=".export.sym"
|
LD_DEPS=".export.sym"
|
||||||
|
LD_FLAGS="-Wl,--export-dynamic"
|
||||||
SOFLAG="-shared"
|
SOFLAG="-shared"
|
||||||
DEVMAPPER=yes
|
DEVMAPPER=yes
|
||||||
ODIRECT=yes ;;
|
ODIRECT=yes ;;
|
||||||
@ -3894,6 +3895,7 @@ case "$host_os" in
|
|||||||
CLDWHOLEARCHIVE="-all_load"
|
CLDWHOLEARCHIVE="-all_load"
|
||||||
CLDNOWHOLEARCHIVE=
|
CLDNOWHOLEARCHIVE=
|
||||||
LD_DEPS=
|
LD_DEPS=
|
||||||
|
LD_FLAGS=
|
||||||
SOFLAG="-dynamiclib"
|
SOFLAG="-dynamiclib"
|
||||||
DEVMAPPER=no
|
DEVMAPPER=no
|
||||||
ODIRECT=no ;;
|
ODIRECT=no ;;
|
||||||
@ -4582,11 +4584,22 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test x$HAVE_LIBDL = xyes; then
|
if [ "x$HAVE_LIBDL" = xyes -a "xSTATIC_LINK" = xno ]; then
|
||||||
CFLAGS="$CFLAGS -DHAVE_LIBDL"
|
CFLAGS="$CFLAGS -DHAVE_LIBDL"
|
||||||
LIBS="-ldl $LIBS"
|
LIBS="-ldl $LIBS"
|
||||||
|
else
|
||||||
|
HAVE_LIBDL=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "x$LVM1" = xshared -a "x$STATIC_LINK" = xyes ];
|
||||||
|
then { { echo "$as_me:$LINENO: error: Features cannot be \"shared\" when building statically
|
||||||
|
" >&5
|
||||||
|
echo "$as_me: error: Features cannot be \"shared\" when building statically
|
||||||
|
" >&2;}
|
||||||
|
{ (exit 1); exit 1; }; }
|
||||||
|
exit
|
||||||
|
fi;
|
||||||
|
|
||||||
|
|
||||||
for ac_header in getopt.h
|
for ac_header in getopt.h
|
||||||
do
|
do
|
||||||
@ -4989,6 +5002,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files Makefile make.tmpl include/Makefile lib/Makefile lib/format1/Makefile man/Makefile po/Makefile tools/Makefile tools/version.h test/mm/Makefile test/device/Makefile test/format1/Makefile test/regex/Makefile test/filters/Makefile"
|
ac_config_files="$ac_config_files Makefile make.tmpl include/Makefile lib/Makefile lib/format1/Makefile man/Makefile po/Makefile tools/Makefile tools/version.h test/mm/Makefile test/device/Makefile test/format1/Makefile test/regex/Makefile test/filters/Makefile"
|
||||||
@ -5678,6 +5692,7 @@ s,@CLDFLAGS@,$CLDFLAGS,;t t
|
|||||||
s,@CLDWHOLEARCHIVE@,$CLDWHOLEARCHIVE,;t t
|
s,@CLDWHOLEARCHIVE@,$CLDWHOLEARCHIVE,;t t
|
||||||
s,@CLDNOWHOLEARCHIVE@,$CLDNOWHOLEARCHIVE,;t t
|
s,@CLDNOWHOLEARCHIVE@,$CLDNOWHOLEARCHIVE,;t t
|
||||||
s,@LD_DEPS@,$LD_DEPS,;t t
|
s,@LD_DEPS@,$LD_DEPS,;t t
|
||||||
|
s,@LD_FLAGS@,$LD_FLAGS,;t t
|
||||||
s,@SOFLAG@,$SOFLAG,;t t
|
s,@SOFLAG@,$SOFLAG,;t t
|
||||||
s,@LVM_VERSION@,$LVM_VERSION,;t t
|
s,@LVM_VERSION@,$LVM_VERSION,;t t
|
||||||
s,@DEBUG@,$DEBUG,;t t
|
s,@DEBUG@,$DEBUG,;t t
|
||||||
|
15
configure.in
15
configure.in
@ -55,6 +55,7 @@ case "$host_os" in
|
|||||||
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||||
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||||
LD_DEPS=".export.sym"
|
LD_DEPS=".export.sym"
|
||||||
|
LD_FLAGS="-Wl,--export-dynamic"
|
||||||
SOFLAG="-shared"
|
SOFLAG="-shared"
|
||||||
DEVMAPPER=yes
|
DEVMAPPER=yes
|
||||||
ODIRECT=yes ;;
|
ODIRECT=yes ;;
|
||||||
@ -64,6 +65,7 @@ case "$host_os" in
|
|||||||
CLDWHOLEARCHIVE="-all_load"
|
CLDWHOLEARCHIVE="-all_load"
|
||||||
CLDNOWHOLEARCHIVE=
|
CLDNOWHOLEARCHIVE=
|
||||||
LD_DEPS=
|
LD_DEPS=
|
||||||
|
LD_FLAGS=
|
||||||
SOFLAG="-dynamiclib"
|
SOFLAG="-dynamiclib"
|
||||||
DEVMAPPER=no
|
DEVMAPPER=no
|
||||||
ODIRECT=no ;;
|
ODIRECT=no ;;
|
||||||
@ -183,11 +185,21 @@ fi
|
|||||||
dnl Check for dlopen
|
dnl Check for dlopen
|
||||||
AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
|
AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
|
||||||
|
|
||||||
if test x$HAVE_LIBDL = xyes; then
|
if [[ "x$HAVE_LIBDL" = xyes -a "xSTATIC_LINK" = xno ]]; then
|
||||||
CFLAGS="$CFLAGS -DHAVE_LIBDL"
|
CFLAGS="$CFLAGS -DHAVE_LIBDL"
|
||||||
LIBS="-ldl $LIBS"
|
LIBS="-ldl $LIBS"
|
||||||
|
else
|
||||||
|
HAVE_LIBDL=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Check for shared/static conflicts
|
||||||
|
if [[ "x$LVM1" = xshared -a "x$STATIC_LINK" = xyes ]];
|
||||||
|
then AC_MSG_ERROR(
|
||||||
|
Features cannot be \"shared\" when building statically
|
||||||
|
)
|
||||||
|
exit
|
||||||
|
fi;
|
||||||
|
|
||||||
dnl Check for getopt
|
dnl Check for getopt
|
||||||
AC_CHECK_HEADERS(getopt.h, CFLAGS="$CFLAGS -DHAVE_GETOPTLONG")
|
AC_CHECK_HEADERS(getopt.h, CFLAGS="$CFLAGS -DHAVE_GETOPTLONG")
|
||||||
|
|
||||||
@ -246,6 +258,7 @@ AC_SUBST(CLDFLAGS)
|
|||||||
AC_SUBST(CLDWHOLEARCHIVE)
|
AC_SUBST(CLDWHOLEARCHIVE)
|
||||||
AC_SUBST(CLDNOWHOLEARCHIVE)
|
AC_SUBST(CLDNOWHOLEARCHIVE)
|
||||||
AC_SUBST(LD_DEPS)
|
AC_SUBST(LD_DEPS)
|
||||||
|
AC_SUBST(LD_FLAGS)
|
||||||
AC_SUBST(SOFLAG)
|
AC_SUBST(SOFLAG)
|
||||||
AC_SUBST(LIBS)
|
AC_SUBST(LIBS)
|
||||||
AC_SUBST(LVM_VERSION)
|
AC_SUBST(LVM_VERSION)
|
||||||
|
@ -97,7 +97,7 @@ endif
|
|||||||
|
|
||||||
LIB_STATIC = liblvm.a
|
LIB_STATIC = liblvm.a
|
||||||
|
|
||||||
TARGETS = $(LIB_STATIC)
|
$(SUBDIRS): $(LIB_STATIC)
|
||||||
|
|
||||||
include ../make.tmpl
|
include ../make.tmpl
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ SOURCES =\
|
|||||||
lvm1-label.c \
|
lvm1-label.c \
|
||||||
vg_number.c
|
vg_number.c
|
||||||
|
|
||||||
TARGETS = liblvm2format1.so
|
LIB_SHARED = liblvm2format1.so
|
||||||
|
|
||||||
include ../../make.tmpl
|
include ../../make.tmpl
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ CLDFLAGS += @CLDFLAGS@
|
|||||||
CLDWHOLEARCHIVE += @CLDWHOLEARCHIVE@
|
CLDWHOLEARCHIVE += @CLDWHOLEARCHIVE@
|
||||||
CLDNOWHOLEARCHIVE += @CLDNOWHOLEARCHIVE@
|
CLDNOWHOLEARCHIVE += @CLDNOWHOLEARCHIVE@
|
||||||
LD_DEPS += @LD_DEPS@
|
LD_DEPS += @LD_DEPS@
|
||||||
|
LD_FLAGS += @LD_FLAGS@
|
||||||
SOFLAG += @SOFLAG@
|
SOFLAG += @SOFLAG@
|
||||||
|
|
||||||
# Setup directory variables
|
# Setup directory variables
|
||||||
@ -109,6 +110,8 @@ SUBDIRS.distclean := $(SUBDIRS:=.distclean)
|
|||||||
.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
|
.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
|
||||||
.PHONY: $(SUBDIRS.pofile)
|
.PHONY: $(SUBDIRS.pofile)
|
||||||
|
|
||||||
|
TARGETS += $(LIB_SHARED) $(LIB_STATIC)
|
||||||
|
|
||||||
all: $(SUBDIRS) $(TARGETS)
|
all: $(SUBDIRS) $(TARGETS)
|
||||||
|
|
||||||
install: all $(SUBDIRS.install)
|
install: all $(SUBDIRS.install)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user