Browse Source

LINUX: Fix build with libtorrent 1.0.x. Closes #1878.

adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
441f63d9af
  1. 3
      conf.pri.in
  2. 37
      configure
  3. 30
      configure.ac

3
conf.pri.in

@ -5,7 +5,8 @@ BINDIR = @EXPAND_BINDIR@ @@ -5,7 +5,8 @@ BINDIR = @EXPAND_BINDIR@
DATADIR = @EXPAND_DATADIR@
MANPREFIX = @EXPAND_MANDIR@
QMAKE_CXXFLAGS += @CPPFLAGS@
QMAKE_CXXFLAGS += @QBT_CONF_EXTRA_CFLAGS@
INCLUDEPATH += @QBT_CONF_INCLUDES@
LIBS += @LDFLAGS@ @LIBS@
CONFIG += @QBT_ADD_CONFIG@

37
configure vendored

@ -592,6 +592,8 @@ QBT_REMOVE_DEFINES @@ -592,6 +592,8 @@ QBT_REMOVE_DEFINES
QBT_ADD_DEFINES
QBT_REMOVE_CONFIG
QBT_ADD_CONFIG
QBT_CONF_EXTRA_CFLAGS
QBT_CONF_INCLUDES
EXPAND_MANDIR
EXPAND_DATADIR
EXPAND_BINDIR
@ -2787,8 +2789,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2787,8 +2789,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@ -4080,6 +4082,7 @@ fi @@ -4080,6 +4082,7 @@ fi
# Define --wth-* and --enable-* arguments
@ -5375,12 +5378,42 @@ _ACEOF @@ -5375,12 +5378,42 @@ _ACEOF
test "$exec_prefix_NONE" && exec_prefix=NONE
# Original extract() function contributed by pmzqla
# $*: Strings to parse
# Set $DEFINES, $INCLUDES, $OTHER
extract() {
if [ -z "$*" ]; then
echo "Input string required"
return 1
fi
# Convert " -" to "\n" if not between quotes
string=$(echo " $*" | sed -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g")
SAVEIFS=$IFS
IFS=$(printf "\n\b")
for i in $string; do
case "$(echo "$i" | cut -c1)" in
'') ;;
D) QBT_CONF_DEFINES="$(echo $i | cut -c2-) $QBT_CONF_DEFINES";;
I) QBT_CONF_INCLUDES="$(echo $i | cut -c2-) $QBT_CONF_INCLUDES";;
*) QBT_CONF_EXTRA_CFLAGS="-$i $QBT_CONF_EXTRA_CFLAGS";;
esac
done
IFS=$SAVEIFS
}
extract $CPPFLAGS
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS $CXXFLAGS"
# Substitute the values of these vars in conf.pri.in
ac_config_files="$ac_config_files conf.pri"
cat >confcache <<\_ACEOF

30
configure.ac

@ -172,7 +172,37 @@ AX_DEFINE_DIR([EXPAND_BINDIR], [bindir]) @@ -172,7 +172,37 @@ AX_DEFINE_DIR([EXPAND_BINDIR], [bindir])
AX_DEFINE_DIR([EXPAND_DATADIR], [datadir])
AX_DEFINE_DIR([EXPAND_MANDIR], [mandir])
# Original extract() function contributed by pmzqla
# $*: Strings to parse
# Set $DEFINES, $INCLUDES, $OTHER
extract() {
if [[ -z "$*" ]]; then
echo "Input string required"
return 1
fi
# Convert " -" to "\n" if not between quotes
string=$(echo " $*" | sed -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g")
SAVEIFS=$IFS
IFS=$(printf "\n\b")
for i in $string; do
case "$(echo "$i" | cut -c1)" in
'') ;;
D) QBT_CONF_DEFINES="$(echo $i | cut -c2-) $QBT_CONF_DEFINES";;
I) QBT_CONF_INCLUDES="$(echo $i | cut -c2-) $QBT_CONF_INCLUDES";;
*) QBT_CONF_EXTRA_CFLAGS="-$i $QBT_CONF_EXTRA_CFLAGS";;
esac
done
IFS=$SAVEIFS
}
extract $CPPFLAGS
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS $CXXFLAGS"
# Substitute the values of these vars in conf.pri.in
AC_SUBST(QBT_CONF_INCLUDES)
AC_SUBST(QBT_CONF_EXTRA_CFLAGS)
AC_SUBST(QBT_ADD_CONFIG)
AC_SUBST(QBT_REMOVE_CONFIG)
AC_SUBST(QBT_ADD_DEFINES)

Loading…
Cancel
Save