1dnl Functions for Python bindings 2dnl 3dnl Version: 20201230 4 5dnl Function to check if the python binary is available 6dnl "python${PYTHON_VERSION} python python# python#.#" 7AC_DEFUN([AX_PROG_PYTHON], 8 [AS_IF( 9 [test "x${PYTHON_VERSION}" != x], 10 [ax_python_progs="python${PYTHON_VERSION}"], 11 [ax_python_progs="python python3 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5"]) 12 AC_CHECK_PROGS( 13 [PYTHON], 14 [$ax_python_progs]) 15 AS_IF( 16 [test "x${PYTHON}" != x], 17 [ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`; 18 ax_prog_python_platform=`${PYTHON} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; 19 AC_SUBST( 20 [PYTHON_PLATFORM], 21 [$ax_prog_python_platform]) 22 ], 23 [AC_MSG_ERROR( 24 [Unable to find python]) 25 ]) 26 AC_SUBST( 27 [PYTHON], 28 [$PYTHON]) 29 ]) 30 31dnl Function to check if the python2 binary is available 32dnl "python2 python2.#" 33AC_DEFUN([AX_PROG_PYTHON2], 34 [ax_python2_progs="python2 python2.7 python2.6 python2.5" 35 AC_CHECK_PROGS( 36 [PYTHON2], 37 [$ax_python2_progs]) 38 AS_IF( 39 [test "x${PYTHON2}" != x], 40 [ax_prog_python2_version=`${PYTHON2} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`; 41 AC_SUBST( 42 [PYTHON2_VERSION], 43 [$ax_prog_python2_version]) 44 45 ax_prog_python2_platform=`${PYTHON2} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; 46 AC_SUBST( 47 [PYTHON2_PLATFORM], 48 [$ax_prog_python2_platform]) 49 ], 50 [AC_MSG_ERROR( 51 [Unable to find python2]) 52 ]) 53 AC_SUBST( 54 [PYTHON2], 55 [$PYTHON2]) 56 ]) 57 58dnl Function to check if the python3 binary is available 59dnl "python3 python3.#" 60AC_DEFUN([AX_PROG_PYTHON3], 61 [ax_python3_progs="python3 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0" 62 AC_CHECK_PROGS( 63 [PYTHON3], 64 [$ax_python3_progs]) 65 AS_IF( 66 [test "x${PYTHON3}" != x], 67 [ax_prog_python3_version=`${PYTHON3} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`; 68 AC_SUBST( 69 [PYTHON3_VERSION], 70 [$ax_prog_python3_version]) 71 72 ax_prog_python3_platform=`${PYTHON3} -c "import sys; sys.stdout.write(sys.platform)" 2>/dev/null`; 73 AC_SUBST( 74 [PYTHON3_PLATFORM], 75 [$ax_prog_python3_platform]) 76 ], 77 [AC_MSG_ERROR( 78 [Unable to find python3]) 79 ]) 80 AC_SUBST( 81 [PYTHON3], 82 [$PYTHON3]) 83 ]) 84 85dnl Function to check if the python-config binary is available 86dnl "python${PYTHON_VERSION}-config python-config" 87AC_DEFUN([AX_PROG_PYTHON_CONFIG], 88 [AS_IF( 89 [test "x${PYTHON_CONFIG}" = x && test "x${PYTHON_VERSION}" != x], 90 [AC_CHECK_PROGS( 91 [PYTHON_CONFIG], 92 [python${PYTHON_VERSION}-config]) 93 ]) 94 AS_IF( 95 [test "x${PYTHON_CONFIG}" = x], 96 [AC_CHECK_PROGS( 97 [PYTHON_CONFIG], 98 [python-config python3-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config]) 99 ]) 100 AS_IF( 101 [test "x${PYTHON_CONFIG}" = x], 102 [AC_MSG_ERROR( 103 [Unable to find python-config]) 104 ]) 105 AC_SUBST( 106 [PYTHON_CONFIG], 107 [$PYTHON_CONFIG]) 108 ]) 109 110dnl Function to check if the python2-config binary is available 111AC_DEFUN([AX_PROG_PYTHON2_CONFIG], 112 [AS_IF( 113 [test "x${PYTHON2_CONFIG}" = x], 114 [AC_CHECK_PROGS( 115 [PYTHON2_CONFIG], 116 [python2-config python2.7-config python2.6-config python2.5-config]) 117 ]) 118 AS_IF( 119 [test "x${PYTHON2_CONFIG}" = x], 120 [AC_MSG_ERROR( 121 [Unable to find python2-config]) 122 ]) 123 AC_SUBST( 124 [PYTHON2_CONFIG], 125 [$PYTHON2_CONFIG]) 126 ]) 127 128dnl Function to check if the python3-config binary is available 129AC_DEFUN([AX_PROG_PYTHON3_CONFIG], 130 [AS_IF( 131 [test "x${PYTHON3_CONFIG}" = x], 132 [AC_CHECK_PROGS( 133 [PYTHON3_CONFIG], 134 [python3-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config]) 135 ]) 136 AS_IF( 137 [test "x${PYTHON3_CONFIG}" = x], 138 [AC_MSG_ERROR( 139 [Unable to find python3-config]) 140 ]) 141 AC_SUBST( 142 [PYTHON3_CONFIG], 143 [$PYTHON3_CONFIG]) 144 ]) 145 146dnl Function to detect if a Python build environment is available 147AC_DEFUN([AX_PYTHON_CHECK], 148 [AX_PROG_PYTHON 149 AX_PROG_PYTHON_CONFIG 150 151 AS_IF( 152 [test "x${PYTHON_CONFIG}" != x], 153 [dnl Check for Python includes 154 PYTHON_INCLUDES=`${PYTHON_CONFIG} --includes 2>/dev/null`; 155 156 AC_MSG_CHECKING( 157 [for Python includes]) 158 AC_MSG_RESULT( 159 [$PYTHON_INCLUDES]) 160 161 dnl Check for Python libraries 162 PYTHON_LDFLAGS=`${PYTHON_CONFIG} --ldflags 2>/dev/null`; 163 164 AC_MSG_CHECKING( 165 [for Python libraries]) 166 AC_MSG_RESULT( 167 [$PYTHON_LDFLAGS]) 168 169 dnl For CygWin add the -no-undefined linker flag 170 AS_CASE( 171 [$host_os], 172 [cygwin*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], 173 [*],[]) 174 175 dnl Check for the existence of Python.h 176 BACKUP_CPPFLAGS="${CPPFLAGS}" 177 CPPFLAGS="${CPPFLAGS} ${PYTHON_INCLUDES}" 178 179 AC_CHECK_HEADERS( 180 [Python.h], 181 [ac_cv_header_python_h=yes], 182 [ac_cv_header_python_h=no]) 183 184 CPPFLAGS="${BACKUP_CPPFLAGS}" 185 ]) 186 187 AS_IF( 188 [test "x${ac_cv_header_python_h}" != xyes], 189 [ac_cv_enable_python=no], 190 [ac_cv_enable_python=${ax_prog_python_version} 191 AC_SUBST( 192 [PYTHON_CPPFLAGS], 193 [$PYTHON_INCLUDES]) 194 195 AC_SUBST( 196 [PYTHON_LDFLAGS], 197 [$PYTHON_LDFLAGS]) 198 199 dnl Check for Python prefix 200 AS_IF( 201 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 202 [ax_python_prefix="\${prefix}"], 203 [ax_python_prefix=`${PYTHON_CONFIG} --prefix 2>/dev/null`]) 204 205 AC_SUBST( 206 [PYTHON_PREFIX], 207 [$ax_python_prefix]) 208 209 dnl Check for Python exec-prefix 210 AS_IF( 211 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 212 [ax_python_exec_prefix="\${exec_prefix}"], 213 [ax_python_exec_prefix=`${PYTHON_CONFIG} --exec-prefix 2>/dev/null`]) 214 215 AC_SUBST( 216 [PYTHON_EXEC_PREFIX], 217 [$ax_python_exec_prefix]) 218 219 dnl Check for Python library directory 220 ax_python_pythondir_suffix=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; 221 222 AS_IF( 223 [test "x${ac_cv_with_pythondir}" = x || test "x${ac_cv_with_pythondir}" = xno], 224 [AS_IF( 225 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 226 [ax_python_pythondir="${ax_python_prefix}/${ax_python_pythondir_suffix}"], 227 [ax_python_pythondir=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null`])], 228 [ax_python_pythondir=$ac_cv_with_pythondir]) 229 230 AC_SUBST( 231 [pythondir], 232 [$ax_python_pythondir]) 233 234 dnl Check for Python platform specific library directory 235 ax_python_pyexecdir_suffix=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; 236 ax_python_library_dir=`${PYTHON} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; 237 238 AS_IF( 239 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 240 [ax_python_pyexecdir="${ax_python_exec_prefix}/${ax_python_pyexecdir_suffix}"], 241 [ax_python_pyexecdir=$ax_python_library_dir]) 242 243 AC_SUBST( 244 [pyexecdir], 245 [$ax_python_pyexecdir]) 246 247 AC_SUBST( 248 [PYTHON_LIBRARY_DIR], 249 [$ax_python_pyexecdir_suffix]) 250 251 AC_SUBST( 252 [PYTHON_PACKAGE_DIR], 253 [$ax_python_library_dir]) 254 ]) 255 ]) 256 257dnl Function to detect if a Python 2 build environment is available 258AC_DEFUN([AX_PYTHON2_CHECK], 259 [AX_PROG_PYTHON2 260 AX_PROG_PYTHON2_CONFIG 261 262 AS_IF( 263 [test "x${PYTHON2_CONFIG}" != x], 264 [dnl Check for Python 2 includes 265 PYTHON2_INCLUDES=`${PYTHON2_CONFIG} --includes 2>/dev/null`; 266 267 AC_MSG_CHECKING( 268 [for Python verison 2 includes]) 269 AC_MSG_RESULT( 270 [$PYTHON2_INCLUDES]) 271 272 dnl Check for Python 2 libraries 273 PYTHON2_LDFLAGS=`${PYTHON2_CONFIG} --ldflags 2>/dev/null`; 274 275 AC_MSG_CHECKING( 276 [for Python 2 libraries]) 277 AC_MSG_RESULT( 278 [$PYTHON2_LDFLAGS]) 279 280 dnl For CygWin add the -no-undefined linker flag 281 AS_CASE( 282 [$host_os], 283 [cygwin*],[PYTHON2_LDFLAGS="${PYTHON2_LDFLAGS} -no-undefined"], 284 [*],[]) 285 286 dnl Check for the existence of Python.h 287 BACKUP_CPPFLAGS="${CPPFLAGS}" 288 CPPFLAGS="${CPPFLAGS} ${PYTHON2_INCLUDES}" 289 290 AC_CHECK_HEADERS( 291 [Python.h], 292 [ac_cv_header_python2_h=yes], 293 [ac_cv_header_python2_h=no]) 294 295 CPPFLAGS="${BACKUP_CPPFLAGS}" 296 ]) 297 298 AS_IF( 299 [test "x${ac_cv_header_python2_h}" != xyes], 300 [ac_cv_enable_python2=no], 301 [ac_cv_enable_python2=$PYTHON2_VERSION 302 AC_SUBST( 303 [PYTHON2_CPPFLAGS], 304 [$PYTHON2_INCLUDES]) 305 306 AC_SUBST( 307 [PYTHON2_LDFLAGS], 308 [$PYTHON2_LDFLAGS]) 309 310 dnl Check for Python prefix 311 AS_IF( 312 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 313 [ax_python2_prefix="\${prefix}"], 314 [ax_python2_prefix=`${PYTHON2_CONFIG} --prefix 2>/dev/null`]) 315 316 AC_SUBST( 317 [PYTHON2_PREFIX], 318 [$ax_python2_prefix]) 319 320 dnl Check for Python exec-prefix 321 AS_IF( 322 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 323 [ax_python2_exec_prefix="\${exec_prefix}"], 324 [ax_python2_exec_prefix=`${PYTHON2_CONFIG} --exec-prefix 2>/dev/null`]) 325 326 AC_SUBST( 327 [PYTHON2_EXEC_PREFIX], 328 [$ax_python2_exec_prefix]) 329 330 dnl Check for Python 2 library directory 331 ax_python2_pythondir_suffix=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; 332 333 AS_IF( 334 [test "x${ac_cv_with_pythondir2}" = x || test "x${ac_cv_with_pythondir2}" = xno], 335 [AS_IF( 336 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 337 [ax_python2_pythondir="${ax_python_prefix}/${ax_python2_pythondir_suffix}"], 338 [ax_python2_pythondir=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null`])], 339 [ax_python2_pythondir=$ac_cv_with_pythondir2]) 340 341 AC_SUBST( 342 [pythondir2], 343 [$ax_python2_pythondir]) 344 345 dnl Check for Python 2 platform specific library directory 346 ax_python2_pyexecdir_suffix=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; 347 ax_python2_library_dir=`${PYTHON2} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; 348 349 AS_IF( 350 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 351 [ax_python2_pyexecdir="${ax_python2_exec_prefix}/${ax_python2_pyexecdir_suffix}"], 352 [ax_python2_pyexecdir=$ax_python2_library_dir]) 353 354 AC_SUBST( 355 [pyexecdir2], 356 [$ax_python2_pyexecdir]) 357 358 AC_SUBST( 359 [PYTHON2_LIBRARY_DIR], 360 [$ax_python2_pyexecdir_suffix]) 361 362 AC_SUBST( 363 [PYTHON2_PACKAGE_DIR], 364 [$ax_python2_library_dir]) 365 ]) 366 ]) 367 368dnl Function to detect if a Python 3 build environment is available 369AC_DEFUN([AX_PYTHON3_CHECK], 370 [AX_PROG_PYTHON3 371 AX_PROG_PYTHON3_CONFIG 372 373 AS_IF( 374 [test "x${PYTHON3_CONFIG}" != x], 375 [dnl Check for Python 3 includes 376 PYTHON3_INCLUDES=`${PYTHON3_CONFIG} --includes 2>/dev/null`; 377 378 AC_MSG_CHECKING( 379 [for Python verison 3 includes]) 380 AC_MSG_RESULT( 381 [$PYTHON3_INCLUDES]) 382 383 dnl Check for Python 3 libraries 384 PYTHON3_LDFLAGS=`${PYTHON3_CONFIG} --ldflags 2>/dev/null`; 385 386 AC_MSG_CHECKING( 387 [for Python 3 libraries]) 388 AC_MSG_RESULT( 389 [$PYTHON3_LDFLAGS]) 390 391 dnl For CygWin add the -no-undefined linker flag 392 AS_CASE( 393 [$host_os], 394 [cygwin*],[PYTHON3_LDFLAGS="${PYTHON3_LDFLAGS} -no-undefined"], 395 [*],[]) 396 397 dnl Check for the existence of Python.h 398 BACKUP_CPPFLAGS="${CPPFLAGS}" 399 CPPFLAGS="${CPPFLAGS} ${PYTHON3_INCLUDES}" 400 401 AC_CHECK_HEADERS( 402 [Python.h], 403 [ac_cv_header_python3_h=yes], 404 [ac_cv_header_python3_h=no]) 405 406 CPPFLAGS="${BACKUP_CPPFLAGS}" 407 ]) 408 409 AS_IF( 410 [test "x${ac_cv_header_python3_h}" != xyes], 411 [ac_cv_enable_python3=no], 412 [ac_cv_enable_python3=$PYTHON3_VERSION 413 AC_SUBST( 414 [PYTHON3_CPPFLAGS], 415 [$PYTHON3_INCLUDES]) 416 417 AC_SUBST( 418 [PYTHON3_LDFLAGS], 419 [$PYTHON3_LDFLAGS]) 420 421 dnl Check for Python prefix 422 AS_IF( 423 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 424 [ax_python3_prefix="\${prefix}"], 425 [ax_python3_prefix=`${PYTHON3_CONFIG} --prefix 2>/dev/null`]) 426 427 AC_SUBST( 428 [PYTHON3_PREFIX], 429 [$ax_python3_prefix]) 430 431 dnl Check for Python exec-prefix 432 AS_IF( 433 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 434 [ax_python3_exec_prefix="\${exec_prefix}"], 435 [ax_python3_exec_prefix=`${PYTHON3_CONFIG} --exec-prefix 2>/dev/null`]) 436 437 AC_SUBST( 438 [PYTHON3_EXEC_PREFIX], 439 [$ax_python3_exec_prefix]) 440 441 dnl Check for Python 3 library directory 442 ax_python3_pythondir_suffix=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(0, 0, prefix=''))" 2>/dev/null`; 443 444 AS_IF( 445 [test "x${ac_cv_with_pythondir3}" = x || test "x${ac_cv_with_pythondir3}" = xno], 446 [AS_IF( 447 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 448 [ax_python3_pythondir="${ax_python_prefix}/${ax_python3_pythondir_suffix}"], 449 [ax_python3_pythondir=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib()) " 2>/dev/null`])], 450 [ax_python3_pythondir=$ac_cv_with_pythondir3]) 451 452 AC_SUBST( 453 [pythondir3], 454 [$ax_python3_pythondir]) 455 456 dnl Check for Python 3 platform specific library directory 457 ax_python3_pyexecdir_suffix=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(1, 0, prefix=''))" 2>/dev/null`; 458 ax_python3_library_dir=`${PYTHON3} -c "import sys; import distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_lib(True)) " 2>/dev/null`; 459 460 AS_IF( 461 [test "x${ac_cv_with_pyprefix}" = x || test "x${ac_cv_with_pyprefix}" = xno], 462 [ax_python3_pyexecdir="${ax_python3_exec_prefix}/${ax_python3_pyexecdir_suffix}"], 463 [ax_python3_pyexecdir=$ax_python3_library_dir]) 464 465 AC_SUBST( 466 [pyexecdir3], 467 [$ax_python3_pyexecdir]) 468 469 AC_SUBST( 470 [PYTHON3_LIBRARY_DIR], 471 [$ax_python3_pyexecdir_suffix]) 472 473 AC_SUBST( 474 [PYTHON3_PACKAGE_DIR], 475 [$ax_python3_library_dir]) 476 ]) 477 ]) 478 479dnl Function to determine the prefix of pythondir 480AC_DEFUN([AX_PYTHON_CHECK_PYPREFIX], 481 [AX_COMMON_ARG_WITH( 482 [pyprefix], 483 [pyprefix], 484 [use `python-config --prefix' to determine the prefix of pythondir instead of --prefix], 485 [no], 486 [no]) 487]) 488 489dnl Function to detect if to enable Python 490AC_DEFUN([AX_PYTHON_CHECK_ENABLE], 491 [AX_PYTHON_CHECK_PYPREFIX 492 493 AX_COMMON_ARG_ENABLE( 494 [python], 495 [python], 496 [build Python bindings], 497 [no]) 498 AX_COMMON_ARG_WITH( 499 [pythondir], 500 [pythondir], 501 [use to specify the Python directory (pythondir)], 502 [no], 503 [no]) 504 505 AX_COMMON_ARG_ENABLE( 506 [python2], 507 [python2], 508 [build Python 2 bindings], 509 [no]) 510 AX_COMMON_ARG_WITH( 511 [pythondir2], 512 [pythondir2], 513 [use to specify the Python 2 directory (pythondir2)], 514 [no], 515 [no]) 516 517 AX_COMMON_ARG_ENABLE( 518 [python3], 519 [python3], 520 [build Python 3 bindings], 521 [no]) 522 AX_COMMON_ARG_WITH( 523 [pythondir3], 524 [pythondir3], 525 [use to specify the Python 3 directory (pythondir3)], 526 [no], 527 [no]) 528 529 AS_IF( 530 [test "x${ac_cv_enable_python}" != xno], 531 [AX_PYTHON_CHECK]) 532 533 AS_IF( 534 [test "x${ac_cv_enable_python2}" != xno], 535 [AX_PYTHON2_CHECK]) 536 537 AS_IF( 538 [test "x${ac_cv_enable_python3}" != xno], 539 [AX_PYTHON3_CHECK]) 540 541 AM_CONDITIONAL( 542 HAVE_PYTHON, 543 [test "x${ac_cv_enable_python}" != xno]) 544 545 AM_CONDITIONAL( 546 HAVE_PYTHON2, 547 [test "x${ac_cv_enable_python2}" != xno]) 548 549 AM_CONDITIONAL( 550 HAVE_PYTHON3, 551 [test "x${ac_cv_enable_python3}" != xno]) 552 553 AM_CONDITIONAL( 554 HAVE_PYTHON_TESTS, 555 [test "x${ac_cv_enable_python}" != xno || test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno]) 556 557 AS_IF( 558 [test "x${ac_cv_enable_python}" = xno], 559 [AS_IF( 560 [test "x${ac_cv_enable_python2}" != xno || test "x${ac_cv_enable_python3}" != xno], 561 [AS_IF( 562 [test "x${ac_cv_enable_python2}" != xno], 563 [ac_cv_enable_python=${ac_cv_enable_python2}], 564 [ac_cv_enable_python=""]) 565 AS_IF( 566 [test "x${ac_cv_enable_python3}" != xno], 567 [AS_IF( 568 [test "x${ac_cv_enable_python}" != x], 569 [ac_cv_enable_python="${ac_cv_enable_python}, "]) 570 ac_cv_enable_python="${ac_cv_enable_python}${ac_cv_enable_python3}"]) 571 ]) 572 ]) 573 ]) 574]) 575 576