|
|
b1d80f |
diff -up hplip-3.20.9/configure.in.configure-python hplip-3.20.9/configure.in
|
|
|
b1d80f |
--- hplip-3.20.9/configure.in.configure-python 2020-09-23 07:24:27.000000000 +0200
|
|
|
b1d80f |
+++ hplip-3.20.9/configure.in 2020-10-02 07:27:09.082331431 +0200
|
|
|
b1d80f |
@@ -604,17 +604,29 @@ if test "$class_driver" = "no" && test "
|
|
|
b1d80f |
fi
|
|
|
b1d80f |
fi
|
|
|
b1d80f |
|
|
|
b1d80f |
-SAVE_CPPFLAGS="$CPPFLAGS"
|
|
|
b1d80f |
-CFLAGS=`python-config --includes`
|
|
|
b1d80f |
-if [ $? -eq 0 ]
|
|
|
b1d80f |
-then
|
|
|
b1d80f |
- echo $FLAGS
|
|
|
b1d80f |
-else
|
|
|
b1d80f |
-CFLAGS=`python3-config --includes`
|
|
|
b1d80f |
- if [ $? -eq 0 ]
|
|
|
b1d80f |
- then
|
|
|
b1d80f |
- echo $FLAGS
|
|
|
b1d80f |
- fi
|
|
|
b1d80f |
+AC_PATH_PROG(python3_config_path, python3-config, [AC_MSG_ERROR([python3-config not installed], 6)])
|
|
|
b1d80f |
+
|
|
|
b1d80f |
+PYTHON_INCLUDES=`$python3_config_path --includes`
|
|
|
b1d80f |
+if test "X$PYTHON_INCLUDES" = "X" ; then
|
|
|
b1d80f |
+ AC_MSG_ERROR([Cannot get Python includes via python3-config], 6)
|
|
|
b1d80f |
+fi
|
|
|
b1d80f |
+
|
|
|
b1d80f |
+PYTHON_LIBS=`$python3_config_path --libs`
|
|
|
b1d80f |
+if test "X$PYTHON_LIBS" = "X" ; then
|
|
|
b1d80f |
+ AC_MSG_ERROR([Cannot get Python libs via python3-config], 6)
|
|
|
b1d80f |
+fi
|
|
|
b1d80f |
+
|
|
|
b1d80f |
+SAVE_CFLAGS=$CFLAGS
|
|
|
b1d80f |
+SAVE_LIBS=$LIBS
|
|
|
b1d80f |
+
|
|
|
b1d80f |
+CFLAGS="$CFLAGS $PYTHON_INCLUDES"
|
|
|
b1d80f |
+LIBS="$LIBS $PYTHON_LIBS"
|
|
|
b1d80f |
+
|
|
|
b1d80f |
+AC_TRY_LINK(,[ ], AC_MSG_RESULT(yes); python_includes="ok", AC_MSG_ERROR([no: PYTHON DISABLED], 6))
|
|
|
b1d80f |
+
|
|
|
b1d80f |
+if test "X$python_includes" != "Xok" ; then
|
|
|
b1d80f |
+ CFLAGS="$SAVE_CFLAGS"
|
|
|
b1d80f |
+ LIBS="$SAVE_LIBS"
|
|
|
b1d80f |
fi
|
|
|
b1d80f |
|
|
|
b1d80f |
#CFLAGS=`(python-config --includes)`
|
|
|
b1d80f |
@@ -631,7 +643,6 @@ if test "$class_driver" = "no" && test "
|
|
|
b1d80f |
AS_IF([test "x$FOUND_HEADER" != "xyes"],
|
|
|
b1d80f |
[AC_MSG_ERROR([cannot find python-devel support], 6)])
|
|
|
b1d80f |
fi
|
|
|
b1d80f |
-CFLAGS="$save_CFLAGS"
|
|
|
b1d80f |
|
|
|
b1d80f |
if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes" && test "$hpcups_only_build" = "no"; then
|
|
|
b1d80f |
AC_CHECK_LIB([sane], [sane_open], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find sane-backends-devel support (or --disable-scan-build)], 12)])
|