Changeset 2058 for trunk/configure.in
- Timestamp:
- Jan 24, 2011, 8:04:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.in
r2038 r2058 1 1 2 AC_INIT([Rappture],[1.1],[rappture@nanohub.org]) 2 3 dnl AC_CONFIG_HEADER(src/core/RpConfig.h) … … 120 121 [location of tclsh @<:@default=yes@:>@])], 121 122 [], 122 [rp_with_tclsh= yes])123 [rp_with_tclsh=$withval]) 123 124 124 125 TCLSH= 125 if test "$rp_with_tclsh" != "no" ; then 126 AC_MSG_CHECKING([for tclsh]) 127 if test -x "$rp_with_tclsh/bin/tclsh" 126 if test "${rp_with_tclsh}" != "no" ; then 127 AC_MSG_CHECKING([for tclsh]) 128 if test -x "${rp_with_tclsh}/bin/tclsh" 129 then 130 TCLSH="${rp_with_tclsh}/bin/tclsh" 131 else 132 if test -x "${rp_with_tclsh}" 128 133 then 129 echo Found tclsh in $rp_with_tclsh/bin/tclsh 130 TCLSH="$rp_with_tclsh/bin/tclsh" 134 TCLSH="${rp_with_tclsh}" 131 135 else 132 if test -x "$rp_with_tclsh" 133 then 134 echo Found tclsh in $rp_with_tclsh 135 TCLSH="$rp_with_tclsh" 136 else 137 if test -x "${exec_prefix}/bin/tclsh" 138 then 139 echo Found tclsh in ${exec_prefix}/bin/tclsh 140 TCLSH="${exec_prefix}/bin/tclsh" 141 else 142 for v in 8.4 8.5 8.6 ; do 143 if test -x "${exec_prefix}/bin/tclsh${v}" 144 then 145 echo Found tclsh in ${exec_prefix}/bin/tclsh${v} 146 TCLSH="${exec_prefix}/bin/tclsh${v}" 147 break 148 fi 149 done 150 fi 151 fi 136 if test -x "${exec_prefix}/bin/tclsh" 137 then 138 TCLSH="${exec_prefix}/bin/tclsh" 139 else 140 for v in 8.4 8.5 8.6 ; do 141 if test -x "${exec_prefix}/bin/tclsh${v}" 142 then 143 TCLSH="${exec_prefix}/bin/tclsh${v}" 144 break 145 fi 146 done 147 fi 152 148 fi 153 if ! test -x ${TCLSH} 154 then 155 AC_PATH_PROG(TCLSH, tclsh) 156 fi 157 fi 158 149 fi 150 if ! test -x ${TCLSH} ; then 151 AC_PATH_PROG(TCLSH, tclsh) 152 fi 153 fi 159 154 AC_MSG_RESULT([${TCLSH}]) 160 155 AC_SUBST(TCLSH) … … 284 279 MKOCTFILE3= 285 280 if test "$rp_with_octave" != "no" ; then 286 AC_MSG_CHECKING([for octave and mkoctfile])287 281 if test "$rp_with_octave" = "yes" ; then 288 282 AC_PATH_PROG(OCTAVE, octave) … … 316 310 if test "$rp_with_octave2" != "no" ; then 317 311 if test "$rp_with_octave2" = "yes" ; then 318 AC_MSG_CHECKING([for octave and mkoctfile])319 312 AC_PATH_PROG(octave2, octave) 320 313 AC_PATH_PROG(mkoctfile2, mkoctfile) … … 342 335 [rp_with_octave3=no]) 343 336 344 echo rp_with_octave3=$rp_with_octave3345 337 if test "$rp_with_octave3" != "no" ; then 346 338 if test "$rp_with_octave3" = "yes" ; then 347 AC_MSG_CHECKING([for octave and mkoctfile])348 339 AC_PATH_PROG(octave3, octave) 349 340 AC_PATH_PROG(mkoctfile3, mkoctfile) … … 354 345 fi 355 346 356 echo octave3=$octave3357 347 if test "x${octave3}" != "x" ; then 358 echo version="${octave3} -v | grep version | cut -d' ' -f4"359 348 version=`${octave3} -v | grep version | cut -d' ' -f4` 360 echo version=$version361 349 version_major=`echo ${version} | cut -d'.' -f1` 362 echo version_major=$version_major363 350 if test "$version_major" = "3" ; then 364 351 OCTAVE3=$rp_with_octave3 … … 394 381 PERL_LIBSPEC= 395 382 if test "$rp_with_perl" != "no" ; then 396 AC_MSG_CHECKING([for perl])397 383 if test "$rp_with_perl" != "yes" ; then 398 384 AC_PATH_PROG(PERL, perl, [], [$rp_with_perl/bin:$rp_with_perl]) … … 410 396 PERL_ARCHLIBEXP=`${PERL} -MConfig -e 'print $Config{archlibexp}'` 411 397 PERL_VERSION_RV=`echo ${PERL_VERSION} | cut -d'.' -f1-2` 412 echo perllib="${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}"413 414 398 # libperl may or may not be installed. Check for its existence. 415 399 if test -f "${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" ; then … … 418 402 fi 419 403 fi 420 AC_MSG_RESULT([${PERL}])421 404 AC_SUBST(PERL) 422 405 AC_SUBST(PERL_INCLUDES) … … 435 418 PYTHON_CFLAGS="" 436 419 PYTHON_CPPFLAGS="" 437 HAVE_PYTHON_DISTUTILS=""420 PYTHON_DISTUTILS="" 438 421 PYTHON_INCLUDES="" 439 422 PYTHON_LDFLAGS="" … … 451 434 452 435 if test "$rp_with_python" != "no" ; then 453 AC_MSG_CHECKING([for python]) 454 if test -x "$rp_with_python/bin/python"; then 455 echo Found python in $rp_with_python/bin/python 456 PYTHON="$rp_with_python/bin/python" 457 elif test -x "$rp_with_python"; then 458 echo Found python in $rp_with_python 459 PYTHON="$rp_with_python" 436 if test "$rp_with_python" = "yes" ; then 437 AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) 460 438 else 461 AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) 462 fi 439 AC_PATH_PROG(PYTHON, python, [], [${rp_with_python}/bin:${rp_with_python}]) 440 fi 441 AC_MSG_CHECKING([for Python version]) 463 442 if test "x${PYTHON}" != "x"; then 464 PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` 465 echo Using python version $PYTHON_VERSION 466 fi 467 if test "x${PYTHON_VERSION}" != "x"; then 468 if test -r $rp_with_python/include/python$PYTHON_VERSION/Python.h -a \ 469 -d $rp_with_python/lib/python$PYTHON_VERSION/site-packages; then 470 PYTHON_INCLUDES=$rp_with_python/include/python$PYTHON_VERSION 471 PYTHON_SITE_PACKAGES=$rp_with_python/lib/python$PYTHON_VERSION/site-packages 472 else 473 if test -r $prefix/include/python$PYTHON_VERSION/Python.h; then 474 PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)' 475 PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' 476 else 477 if test -r /usr/include/python$PYTHON_VERSION/Python.h; then 478 PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION 479 PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' 480 else 481 echo could not find python$PYTHON_VERSION/Python.h 482 fi 483 fi 484 if test ! -d "$PYTHON_SITE_PACKAGES"; then 485 PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` 486 fi 487 fi 488 fi 489 if test "x$rp_with_python" != "x" ; then 490 pythondir='$(PYTHON_SITE_PACKAGES)' 491 else 492 pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages' 493 fi 494 495 AC_MSG_CHECKING([for python distutils]) 443 PYTHON_VERSION=`${PYTHON} -c "import sys; print sys.version[[0:3]]"` 444 fi 445 AC_MSG_RESULT([$PYTHON_VERSION]) 446 fi 447 448 if test "x${PYTHON_VERSION}" != "x"; then 449 PYTHON_INCLUDES=$incdir 450 AC_MSG_CHECKING([for Python distutils]) 451 PYTHON_DISTUTILS="" 496 452 ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \ 497 453 build build_ext 2>&1 > /dev/null 498 454 if test $? = 0 ; then 499 HAVE_PYTHON_DISTUTILS="yes" 500 else 501 HAVE_PYTHON_DISTUTILS="no" 502 fi 503 AC_MSG_RESULT([$HAVE_PYTHON_DISTUTILS]) 504 505 if test "${HAVE_PYTHON_DISTUTILS}" = "yes"; then 455 PYTHON_DISTUTILS="yes" 456 fi 457 AC_MSG_RESULT([$PYTHON_DISTUTILS]) 458 if test "${PYTHON_DISTUTILS}" = "yes" ; then 459 PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` 506 460 # 507 461 # Check for Python include path 508 462 # 509 AC_MSG_CHECKING([for Python include path]) 510 if test "x${PYTHON_CPPFLAGS}" = "x"; then 511 incdir_path=`${PYTHON} -c "import distutils.sysconfig; \ 512 print distutils.sysconfig.get_python_inc();"` 513 if test -n "${incdir}"; then 514 python_path="-I${incdir}" 515 fi 516 PYTHON_CPPFLAGS=$python_path 517 fi 518 AC_MSG_RESULT([$PYTHON_CPPFLAGS]) 519 AC_SUBST([PYTHON_CPPFLAGS]) 463 AC_MSG_CHECKING([path to Python headers]) 464 PYTHON_INCDIR=`${PYTHON} -c "import distutils.sysconfig; \ 465 print distutils.sysconfig.get_python_inc();"` 466 AC_MSG_RESULT([$PYTHON_INCDIR]) 520 467 # 521 # python distutils found, get settings from python directly468 # Python distutils found, get settings from python directly 522 469 # 523 AC_MSG_CHECKING([location of site-packages])524 470 PYTHON_SITE_DIR="`${PYTHON} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`" 525 471 526 472 PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print \" \".join(flags);'`" 527 473 PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print \" \".join(libs);'`" 528 474 PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`" 529 475 PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`" 530 fi 531 fi 532 AC_SUBST(pythondir) 476 save_CPPFLAGS=$CPPFLAGS 477 CPPFLAGS="$CPPFLAGS -I${PYTHON_INCDIR}" 478 AC_CHECK_HEADERS([Python.h], [found=yes], [found=no]) 479 CPPFLAGS=$save_CPPFLAGS 480 if test "$found" = "no" ; then 481 PYTHON_DISTUTILS="" 482 fi 483 fi 484 fi 533 485 534 486 AC_SUBST(PYTHON) 535 487 AC_SUBST(PYTHON_VERSION) 536 488 AC_SUBST(PYTHON_INCLUDES) 489 AC_SUBST(PYTHON_CFLAGS) 490 AC_SUBST(PYTHON_INCDIR) 491 AC_SUBST(PYTHON_LDFLAGS) 492 AC_SUBST(PYTHON_LIB) 493 AC_SUBST(PYTHON_SITE_DIR) 494 AC_SUBST(PYTHON_LIBDIR) 537 495 AC_SUBST(PYTHON_SITE_PACKAGES) 538 AC_SUBST( HAVE_PYTHON_DISTUTILS)496 AC_SUBST(PYTHON_DISTUTILS) 539 497 540 498 rp_with_ruby="yes" … … 543 501 RUBY_DEV_PKG="no" 544 502 545 AC_ARG_WITH(ruby, 546 AS_HELP_STRING([--with-ruby=PATH], [absolute path to ruby executable]), 547 [rp_with_ruby=$withval]) 503 AC_ARG_WITH( 504 [ruby], 505 [AS_HELP_STRING([--with-ruby=DIR], [location of ruby @<:@default=yes@:>@])], 506 [rp_with_ruby=$withval]) 507 548 508 if test "${rp_with_ruby}" != "no" ; then 549 509 if test "${rp_with_ruby}" = "yes" ; then … … 576 536 JAVAC="" 577 537 JAVA_DEV_PKG="no" 578 579 AC_ARG_WITH(java,580 AS_HELP_STRING([--with-java=PATH], [absolute path to java executable]),581 [rp_with_java=$withval])538 AC_ARG_WITH( 539 [java], 540 [AS_HELP_STRING([--with-java=DIR], [location of java @<:@default=yes@:>@])], 541 [rp_with_java=$withval]) 582 542 583 543 if test "${rp_with_java}" != "no" ; then 584 544 if test "${rp_with_java}" = "yes" ; then 585 AC_PATH_PROG(JAVA, java)545 AC_PATH_PROG(JAVA, java) 586 546 AC_PATH_PROG(JAVAC, javac) 587 547 AC_PATH_PROG(JAVAH, javah) … … 818 778 examples/app-fermi/matlab/compiled/Makefile 819 779 examples/app-fermi/matlab/uncompiled/Makefile 820 examples/app-fermi/octave/Makefile821 780 examples/app-fermi/octave/2/Makefile 822 781 examples/app-fermi/octave/3/Makefile 782 examples/app-fermi/octave/Makefile 823 783 examples/app-fermi/perl/Makefile 824 784 examples/app-fermi/python/Makefile … … 856 816 examples/zoo/binary/Makefile 857 817 examples/zoo/boolean/Makefile 858 examples/zoo/parallelepiped/Makefile859 818 examples/zoo/choice/Makefile 860 819 examples/zoo/cloud/Makefile … … 877 836 examples/zoo/number/Makefile 878 837 examples/zoo/number2/Makefile 838 examples/zoo/parallelepiped/Makefile 879 839 examples/zoo/periodicelement/Makefile 880 840 examples/zoo/phase/Makefile
Note: See TracChangeset
for help on using the changeset viewer.