archrelease: copy trunk to extra-x86_64
[arch-packages.git] / hplip / trunk / hplip-configure-python.patch
blob9dc78cdaf6193ed19cf05c0a14e633bdba57a532
1 diff -up hplip-3.20.9/configure.in.configure-python hplip-3.20.9/configure.in
2 --- hplip-3.20.9/configure.in.configure-python 2020-09-23 07:24:27.000000000 +0200
3 +++ hplip-3.20.9/configure.in 2020-10-02 07:27:09.082331431 +0200
4 @@ -604,17 +604,29 @@ if test "$class_driver" = "no" && test "
5 fi
6 fi
8 -SAVE_CPPFLAGS="$CPPFLAGS"
9 -CFLAGS=`python-config --includes`
10 -if [ $? -eq 0 ]
11 -then
12 - echo $FLAGS
13 -else
14 -CFLAGS=`python3-config --includes`
15 - if [ $? -eq 0 ]
16 - then
17 - echo $FLAGS
18 - fi
19 +AC_PATH_PROG(python3_config_path, python3-config, [AC_MSG_ERROR([python3-config not installed], 6)])
21 +PYTHON_INCLUDES=`$python3_config_path --includes`
22 +if test "X$PYTHON_INCLUDES" = "X" ; then
23 + AC_MSG_ERROR([Cannot get Python includes via python3-config], 6)
24 +fi
26 +PYTHON_LIBS=`$python3_config_path --libs`
27 +if test "X$PYTHON_LIBS" = "X" ; then
28 + AC_MSG_ERROR([Cannot get Python libs via python3-config], 6)
29 +fi
31 +SAVE_CFLAGS=$CFLAGS
32 +SAVE_LIBS=$LIBS
34 +CFLAGS="$CFLAGS $PYTHON_INCLUDES"
35 +LIBS="$LIBS $PYTHON_LIBS"
37 +AC_TRY_LINK(,[ ], AC_MSG_RESULT(yes); python_includes="ok", AC_MSG_ERROR([no: PYTHON DISABLED], 6))
39 +if test "X$python_includes" != "Xok" ; then
40 + CFLAGS="$SAVE_CFLAGS"
41 + LIBS="$SAVE_LIBS"
44 #CFLAGS=`(python-config --includes)`
45 @@ -631,7 +643,6 @@ if test "$class_driver" = "no" && test "
46 AS_IF([test "x$FOUND_HEADER" != "xyes"],
47 [AC_MSG_ERROR([cannot find python-devel support], 6)])
49 -CFLAGS="$save_CFLAGS"
51 if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes" && test "$hpcups_only_build" = "no"; then
52 AC_CHECK_LIB([sane], [sane_open], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find sane-backends-devel support (or --disable-scan-build)], 12)])