Change some configure options to --enable-foo (static, debug, tests, etc).

This commit is contained in:
Juan RP 2012-12-29 07:44:10 +01:00
parent ba12ba2689
commit a4e3a489a1
2 changed files with 33 additions and 24 deletions

7
NEWS
View File

@ -1,5 +1,12 @@
xbps-0.20 (???): xbps-0.20 (???):
* configure: changed some options to '--enable-foo':
--enable-static
--enable-api-docs
--enable-debug
--enable-tests
* libxbps: when removing a package and if executing its "pre-remove" * libxbps: when removing a package and if executing its "pre-remove"
action fails, still continue removing this package. action fails, still continue removing this package.

50
configure vendored
View File

@ -25,23 +25,23 @@ By default, \`make install' will install all the files in
an installation prefix other than \`/usr/local' using \`--prefix', an installation prefix other than \`/usr/local' using \`--prefix',
for instance \`--prefix=\$HOME'. for instance \`--prefix=\$HOME'.
--prefix=DIR install architecture-independent files in PREFIX --prefix=DIR Install architecture-independent files in PREFIX
--exec-prefix=DIR install architecture-dependent files in EPREFIX --exec-prefix=DIR Install architecture-dependent files in EPREFIX
--sbindir=DIR system admin executables [PREFIX/sbin] --sbindir=DIR System admin executables [PREFIX/sbin]
--libdir=DIR object code libraries [PREFIX/lib] --libdir=DIR Object code libraries [PREFIX/lib]
--includedir=DIR C header files [EPREFIX/include] --includedir=DIR C header files [EPREFIX/include]
--mandir=DIR man documentation [EPREFIX/share/man] --mandir=DIR Man documentation [EPREFIX/share/man]
--datadir=DIR read-only architecture-independent data [EPREFIX/share] --datadir=DIR Read-only architecture-independent data [EPREFIX/share]
--etcdir=DIR configuration files [PREFIX/etc] --etcdir=DIR Configuration files [PREFIX/etc]
--pkgconfigdir=DIR pkg-config directory [EPREFIX/lib/pkgconfig] --pkgconfigdir=DIR pkg-config directory [EPREFIX/lib/pkgconfig]
--testsdir=DIR test suite directory [EPREFIX/tests] --testsdir=DIR Test suite directory [EPREFIX/tests]
--debug Build with debugging code and symbols --verbose Disable silent build to see compilation details
--verbose Disable silent build to see compilation details --enable-api-docs Install XBPS API Library documentation (default disabled)
--with-api-docs Install XBPS API Library documentation (default disabled) --enable-debug Build with debugging code and symbols (default disabled)
--with-static Build XBPS static utils (default disabled) --enable-static Build XBPS static utils (default disabled)
--with-tests Build and install Kyua tests (default disabled) --enable-tests Build and install Kyua tests (default disabled)
Needs atf >= 0.15 (http://code.google.com/p/kyua) Needs atf >= 0.15 (http://code.google.com/p/kyua)
_EOF _EOF
exit 1 exit 1
} }
@ -50,7 +50,7 @@ for x; do
opt=${x%%=*} opt=${x%%=*}
var=${x#*=} var=${x#*=}
case "$opt" in case "$opt" in
--debug) DEBUG=yes;; --enable-debug) DEBUG=yes;;
--prefix) PREFIX=$var;; --prefix) PREFIX=$var;;
--exec-prefix) EPREFIX=$var;; --exec-prefix) EPREFIX=$var;;
--sbindir) SBINDIR=$var;; --sbindir) SBINDIR=$var;;
@ -63,11 +63,11 @@ for x; do
--etcdir) ETCDIR=$var;; --etcdir) ETCDIR=$var;;
--libdir) LIBDIR=$var;; --libdir) LIBDIR=$var;;
--datadir|--infodir) ;; # ignore autotools --datadir|--infodir) ;; # ignore autotools
--with-api-docs) BUILD_API_DOCS=$var;; --enable-api-docs) BUILD_API_DOCS=$var;;
--verbose) unset SILENT;; --verbose) unset SILENT;;
--pkgconfigdir) PKGCONFIGDIR=$var;; --pkgconfigdir) PKGCONFIGDIR=$var;;
--with-tests) BUILD_TESTS=yes;; --enable-tests) BUILD_TESTS=yes;;
--with-static) BUILD_STATIC=yes;; --enable-static) BUILD_STATIC=yes;;
--testsdir) TESTSDIR=$var;; --testsdir) TESTSDIR=$var;;
--help) usage;; --help) usage;;
*) echo "$0: WARNING: unknown option $opt" >&2;; *) echo "$0: WARNING: unknown option $opt" >&2;;
@ -480,16 +480,17 @@ int main(void) {
} }
EOF EOF
if $XCC -lfetch _$func.c -o _$func 2>/dev/null; then if $XCC -lfetch _$func.c -o _$func 2>/dev/null; then
echo yes. LIBFETCH=yes
echo "USE_EXTERNAL_LIBFETCH = 1" >>$CONFIG_MK echo "USE_EXTERNAL_LIBFETCH = 1" >>$CONFIG_MK
echo "LDFLAGS += -lfetch" >>$CONFIG_MK echo "LDFLAGS += -lfetch" >>$CONFIG_MK
echo "STATIC_LIBS = \$(TOPDIR)/lib/libxbps.a -lfetch" >>$CONFIG_MK echo "STATIC_LIBS = \$(TOPDIR)/lib/libxbps.a -lfetch" >>$CONFIG_MK
else else
echo no. LIBFETCH=no
echo "CPPFLAGS += -I\$(TOPDIR)/lib/fetch" >>$CONFIG_MK echo "CPPFLAGS += -I\$(TOPDIR)/lib/fetch" >>$CONFIG_MK
echo "STATIC_LIBS = \$(TOPDIR)/lib/libxbps.a" >>$CONFIG_MK echo "STATIC_LIBS = \$(TOPDIR)/lib/libxbps.a" >>$CONFIG_MK
fi fi
rm -f _$func.c _$func rm -f _$func.c _$func
echo "${LIBFETCH}."
# #
# Check for prop_dictionary_internalize_from_zfile(). # Check for prop_dictionary_internalize_from_zfile().
@ -505,17 +506,18 @@ int main(void) {
} }
EOF EOF
if $XCC -lprop _$func.c -o _$func 2>/dev/null; then if $XCC -lprop _$func.c -o _$func 2>/dev/null; then
echo yes. PROPLIB=yes
echo "USE_EXTERNAL_PROPLIB = 1" >>$CONFIG_MK echo "USE_EXTERNAL_PROPLIB = 1" >>$CONFIG_MK
echo "LDFLAGS += -lz -lpthread -lprop" >>$CONFIG_MK echo "LDFLAGS += -lz -lpthread -lprop" >>$CONFIG_MK
echo "STATIC_LIBS += -lprop -lz -lpthread" >>$CONFIG_MK echo "STATIC_LIBS += -lprop -lz -lpthread" >>$CONFIG_MK
else else
echo no. PROPLIB=no
echo "CPPFLAGS += -I\$(TOPDIR)/lib/portableproplib" >>$CONFIG_MK echo "CPPFLAGS += -I\$(TOPDIR)/lib/portableproplib" >>$CONFIG_MK
echo "LDFLAGS += -lpthread" >>$CONFIG_MK echo "LDFLAGS += -lpthread" >>$CONFIG_MK
echo "STATIC_LIBS += -lpthread" >>$CONFIG_MK echo "STATIC_LIBS += -lpthread" >>$CONFIG_MK
fi fi
rm -f _$func.c _$func rm -f _$func.c _$func
echo "${PROPLIB}."
# #
# Check for clock_gettime(3). # Check for clock_gettime(3).