1dnl ************************ 2dnl configure.ac 3dnl $Id: configure.ac 8882 2020-11-04 11:12:16Z oli4 $ 4dnl 5dnl Copyright (C) 2002-2020 Olivier Sessink 6dnl Copyright (C) 2006-2012 Daniel Leidert 7dnl 8dnl This file is free software. The copyright owner gives unlimited 9dnl permission to copy, distribute and modify it. 10dnl ************************ 11 12AC_PREREQ([2.59]) 13 14AC_INIT([bluefish],[2.2.12],[https://sourceforge.net/p/bluefish/tickets/]) 15 16dnl Have to save them here! 17if test "${ac_configure_args+set}" != "set" ; then 18 AC_DEFINE_UNQUOTED([CONFIGURE_OPTIONS], ["$0 $@"], [The configure options used to compile bluefish.]) 19else 20 AC_DEFINE_UNQUOTED([CONFIGURE_OPTIONS], ["$0 $ac_configure_args"], [The configure options used to compile bluefish.]) 21fi 22 23dnl The "-Wno-portability" value will suppress the GNU make warnings. Add it if necessary. 24AM_INIT_AUTOMAKE([foreign 1.8 -Wall]) 25AC_CONFIG_SRCDIR(src/bluefish.c) 26AC_CONFIG_HEADERS(src/config.h) 27AC_CANONICAL_HOST 28 29AC_REVISION($Revision: 8882 $) 30 31AM_MAINTAINER_MODE 32 33dnl ************************ 34dnl I18N options 35dnl ************************ 36 37m4_define([_BF_LINGUAS], [ar bg ca cs da de el en es eu fa fi fr gl hu it ja ko nb nl nn pl pt pt_BR ro ru sk sr sv ta tr uk zh_CN zh_TW]) 38#ALL_LINGUAS="bg cs da de el es eu fi fr gl hu it ja ko nb nl pl pt pt_BR ro ru sk sr sv ta tr uk zh_CN zh_TW" 39AC_SUBST([ALL_LINGUAS], "_BF_LINGUAS") 40GETTEXT_PACKAGE=AC_PACKAGE_NAME 41AC_SUBST(GETTEXT_PACKAGE) 42AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [gettext domain]) 43AM_GLIB_GNU_GETTEXT 44 45IT_PROG_INTLTOOL 46dnl if AM_PO_SUBDIRS is available use it (most recent systems) 47dnl else try to use the very old AM_WITH_NLS 48dnl or try AM_GNU_GETTEXT at last 49m4_ifdef( 50 [AM_PO_SUBDIRS], 51 [AM_PO_SUBDIRS], 52 [ 53 m4_ifdef( 54 [AM_WITH_NLS], 55 [AM_WITH_NLS([external])], 56 [AM_GNU_GETTEXT([external])] 57 ) 58 ] 59) 60 61BF_DEFINE_LINGUAS(_BF_LINGUAS) 62 63dnl ************************ 64dnl Compiler options 65dnl ************************ 66 67#AC_ARG_PROGRAM 68AC_PROG_CC 69AM_PROG_AR 70m4_ifdef( 71 [LT_INIT], 72 [ 73 dnl libtool 2.x macros 74 LT_INIT([disable-static dlopen win32-dll]) 75 LT_PROG_RC 76 ],[ 77 dnl libtool 1.4 macros. 78 AC_DISABLE_STATIC 79 AC_LIBTOOL_DLOPEN 80 AC_LIBTOOL_WIN32_DLL 81 AC_LIBTOOL_RC 82 AC_PROG_LIBTOOL 83 ] 84) 85m4_ifdef([DOLT], [DOLT]) 86AC_ISC_POSIX 87AC_C_INLINE 88AC_PROG_INSTALL 89 90if test "$CC" = "gcc" ; then 91 CFLAGS="$CFLAGS -Wall -pipe" 92fi 93 94case "$host_os" in 95 windows* | cygwin* | mingw*) 96 AC_DEFINE([WIN32], [1], [Define to 1 if you have a Cygwin/Windows OS.]) 97 LIBS="$LIBS -lintl.dll" 98 AC_MSG_NOTICE([platform is... Windows/Cygwin]) 99 ;; 100 solaris*) 101 AC_DEFINE([PLATFORM_SOLARIS], [1], [Define to 1 if you have a Solaris OS.]) 102 AC_MSG_NOTICE([platform is... Solaris]) 103 ;; 104esac 105 106case "$host" in 107 *-*-mingw* | *cygwin* | *windows*) 108 native_win32=yes 109 ;; 110 *-apple-darwin*) 111 AC_DEFINE([PLATFORM_DARWIN], [1], [Define to 1 if you have a Darwin host.]) 112 AC_MSG_NOTICE([platform is... MacOSX]) 113 ;; 114 *) 115 native_win32=no 116 ;; 117esac 118 119if test "x$native_win32" = "xyes"; then 120 AC_CHECK_TOOL([WINDRES], [windres], [no]) 121 if test "x$WINDRES" = "xno"; then 122 AC_MSG_ERROR([The tool 'windres' was not found. Aborting.]) 123 fi 124 AC_PROG_SED 125 AC_SUBST([SPLIT_VERSION], [`echo $VERSION | $SED -e 's/-.*//' | $SED -e 's/\./,/g'`]) 126fi 127AM_CONDITIONAL([OS_WIN32], [test "x$native_win32" = "xyes"]) 128 129dnl ************************ 130dnl Necessary tools 131dnl ************************ 132 133AC_ARG_VAR( 134 [GDK_PIXBUF_CSOURCE], 135 [The 'gdk-pixbuf-csource' executable. Use it to define or override its location.] 136) 137AC_CHECK_PROG([GDK_PIXBUF_CSOURCE], [gdk-pixbuf-csource], [gdk-pixbuf-csource]) 138 139dnl ************************ 140dnl Configure options e/d 141dnl ************************ 142 143AC_ARG_ENABLE( 144 [debugging-output], 145 AC_HELP_STRING( 146 [--enable-debugging-output], 147 [enable massive debugging output (slows down the program) @<:@default=no@:>@] 148 ), 149 [ 150 if test "x$enableval" != "xno"; then 151 AC_DEFINE([DEBUG], [1], [Define to 1 if you want to have a massive amount of debug output.]) 152 fi 153 ] 154) 155 156AC_ARG_ENABLE( 157 [highlight-profiling], 158 AC_HELP_STRING( 159 [--enable-highlight-profiling], 160 [enable profiling information about highlighting patterns (slows down the program) @<:@default=no@:>@] 161 ), 162 [ 163 if test "x$enableval" != "xno"; then 164 AC_DEFINE([HL_PROFILING], [1], [Define to 1 if you want to have profiling information about highlighting patterns.]) 165 fi 166 ] 167) 168 169dnl # make DEVELOPEMENT enabled when compiling from svn, and disabled when compiling from an exported source tree. 170AC_MSG_CHECKING([for svn tree or exported source tree]) 171BF_want_development="no" 172BF_svnversion=`LANG=C svnversion -n . || echo exported` 173if test "x$BF_svnversion" != "xexported" ; then 174 AC_MSG_RESULT([svn]) 175 BF_want_development="yes" 176else 177 AC_MSG_RESULT([exported]) 178fi 179AC_ARG_ENABLE( 180 [development], 181 AC_HELP_STRING( 182 [--enable-development], 183 [enable development checks, recommended when building from svn @<:@default=no@:>@] 184 ), 185 [ 186 if test "x$enableval" != "xno"; then 187 BF_want_development="yes" 188 else 189 BF_want_development="no" 190 fi 191 ] 192) 193if test "x$BF_want_development" != "xno" ; then 194 AC_DEFINE([DEVELOPMENT], [1], [Define to 1 if you want to have development checks. Recommended when compiling from svn.]) 195fi 196 197AC_ARG_ENABLE( 198 [gprof-profiling], 199 AC_HELP_STRING( 200 [--enable-gprof-profiling], 201 [enable gprof profiling (slows down the program) @<:@default=no@:>@] 202 ), 203 [ 204 if test "x$enableval" != "xno"; then 205 CFLAGS="$CFLAGS -pg" 206 LDFLAGS="$LDFLAGS -pg" 207 fi 208 ] 209) 210 211AC_ARG_ENABLE( 212 [gcov-coverage], 213 AC_HELP_STRING( 214 [--enable-gcov-coverage], 215 [enable coverage (slows down the program) @<:@default=no@:>@] 216 ), 217 [ 218 if test "x$enableval" != "xno"; then 219 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" 220 fi 221 ] 222) 223 224AC_ARG_ENABLE( 225 [deprecated], 226 AC_HELP_STRING( 227 [--disable-deprecated], 228 [enable/disable deprecated functions (e.g. Glib/Gtk) @<:@default=yes@:>@] 229 ), 230 [ 231 if test "x$enableval" = "xno"; then 232 CFLAGS="$CFLAGS -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES" 233 CFLAGS="$CFLAGS -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED" 234 CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED" 235 CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED" 236 CFLAGS="$CFLAGS -DGSEAL_ENABLE" 237 fi 238 ] 239) 240 241dnl To create our catalog and maybe update the systems XML catalog, we need xmlcatalog. 242dnl But because several systems like Debian or Mac use their own system, so let the user 243dnl decide, if he wants to update the sytems catalog. 244AC_PATH_PROG([XMLCATALOG], [xmlcatalog], [no]) 245if test "x$XMLCATALOG" = "xno"; then 246 AC_MSG_WARN([Install the xmlcatalog application, which is delivered with the GNOME xml-library.]) 247fi 248 249AC_ARG_ENABLE( 250 [xml-catalog-update], 251 AC_HELP_STRING( 252 [--enable-xml-catalog-update], 253 [ 254 enable (or disable) the running of xmlcatalog after installation - 255 some distributions like Debian use their own system for registering 256 catalogs, so be careful here and also check the '--with-xml-catalog' 257 option @<:@default=yes@:>@ 258 ] 259 ), 260) 261 262AC_ARG_ENABLE( 263 [update-databases], 264 AC_HELP_STRING( 265 [--enable-update-databases], 266 [ 267 enable (or disable) the running of update-desktop-database/update-mime-database 268 after installation @<:@default=yes@:>@ 269 ] 270 ) 271) 272 273AC_ARG_VAR( 274 [UPDATE_DESKTOP_DATABASE], 275 [The 'update-desktop-database' program. Use it to define or override its location.] 276) 277AC_ARG_VAR( 278 [UPDATE_MIME_DATABASE], 279 [The 'update-mime-database' program. Use it to define or override its location.] 280) 281if test "x$enable_update_databases" != "xno" ; then 282 AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database]) 283 AC_PATH_PROG([UPDATE_MIME_DATABASE], [update-mime-database]) 284fi 285 286AM_CONDITIONAL([HAVE_UPDATE_DESKTOP_DATABASE], [test -n "$UPDATE_DESKTOP_DATABASE"]) 287AM_CONDITIONAL([HAVE_UPDATE_MIME_DATABASE], [test -n "$UPDATE_MIME_DATABASE"]) 288 289AC_ARG_ENABLE( 290 [spell-check], 291 AC_HELP_STRING( 292 [--enable-spell-check], 293 [enable (or disable) spell checking capabilities @<:@default=yes@:>@] 294 ) 295) 296 297dnl ************************ 298dnl Configure options w/wo 299dnl ************************ 300 301AC_ARG_WITH( 302 [xml-catalog], 303 AC_HELP_STRING( 304 [--with-xml-catalog=@<:@FILE@:>@], 305 [ 306 the specified file is the systems XML catalog (/etc/xml/catalog for most systems), 307 that shall be updated after installation running 308 xmlcatalog @<:@default=${sysconfdir}/xml/catalog@:>@ 309 ] 310 ), 311 [xmlcatalog="$withval"], 312 [xmlcatalog="${sysconfdir}/xml/catalog"] 313) 314 315AC_ARG_WITH( 316 [freedesktop_org-menu], 317 AC_HELP_STRING( 318 [--with-freedesktop_org-menu=@<:@DIR@:>@], 319 [install freedesktop.org menu files in directory DIR (if supplied) or suppress installation @<:@default=${datadir}/applications@:>@] 320 ), 321 [fdomenupath="$withval"], 322 [fdomenupath="${datadir}/applications"] 323) 324 325AC_ARG_WITH( 326 [freedesktop_org-mime], 327 AC_HELP_STRING( 328 [--with-freedesktop_org-mime=@<:@DIR@:>@], 329 [install freedesktop.org mime support files in directory DIR (if supplied) or suppress installation @<:@default=${datadir}/mime@:>@] 330 ), 331 [fdomimepath="$withval"], 332 [fdomimepath="${datadir}/mime"] 333) 334 335AC_ARG_WITH( 336 [freedesktop_org-appdata], 337 AC_HELP_STRING( 338 [--with-freedesktop_org-appdata=@<:@DIR@:>@], 339 [install freedesktop.org appdata support files in directory DIR (if supplied) or suppress installation @<:@default=${datadir}/appdata@:>@] 340 ), 341 [fdoappdatapath="$withval"], 342 [fdoappdatapath="${datadir}/appdata"] 343) 344 345AC_ARG_WITH( 346 [theme-path], 347 AC_HELP_STRING( 348 [--with-theme-path=@<:@DIR@:>@], 349 [install theme icons in directory DIR (if supplied) or suppress installation @<:@default=${datadir}/icons/hicolor@:>@] 350 ), 351 [iconthemepath="$withval"], 352 [iconthemepath="${datadir}/icons/hicolor"] 353) 354 355AC_ARG_WITH( 356 [icon-path], 357 AC_HELP_STRING( 358 [--with-icon-path=@<:@DIR@:>@], 359 [install GNOME-pixmap icons in directory DIR (if supplied) or suppress installation @<:@default=${datadir}/pixmaps@:>@] 360 ), 361 [iconpath="$withval"], 362 [iconpath="${datadir}/pixmaps"] 363) 364 365AC_MSG_CHECKING([for system XML catalog]) 366if ! test -f "`eval echo $xmlcatalog`" ; then 367 AC_MSG_RESULT([not found]) 368 AC_MSG_NOTICE([The given systems XML catalog $xmlcatalog seems to be unavailable.]) 369 AC_MSG_NOTICE([We will not try to update it after installation.]) 370 XML_CATALOG_FILE="" 371else 372 AC_MSG_RESULT([$xmlcatalog]) 373 XML_CATALOG_FILE="$xmlcatalog" 374fi 375 376AC_SUBST([XML_CATALOG_FILE]) 377AM_CONDITIONAL([REGISTER_XML_CATALOG], [test "x$enable_xml_catalog_update" != "xno" -a -n "$XML_CATALOG_FILE" ]) 378AC_SUBST([fdomenupath]) 379AM_CONDITIONAL(INSTALL_FDOMENU, [test "x$fdomenupath" != "xno"]) 380AC_SUBST([fdomimepath]) 381AM_CONDITIONAL(INSTALL_FDOMIME, [test "x$fdomimepath" != "xno"]) 382AC_SUBST([fdoappdatapath]) 383AM_CONDITIONAL(INSTALL_FDOAPPDATA, [test "x$fdoappdatapath" != "xno"]) 384AC_SUBST([iconthemepath]) 385AM_CONDITIONAL(INSTALL_THEMEICONS, [test "x$iconthemepath" != "xno"]) 386AC_SUBST([iconpath]) 387AM_CONDITIONAL(INSTALL_ICONS, [test "x$iconpath" != "xno"]) 388 389 390dnl ************************ 391dnl Standard headers 392dnl ************************ 393 394AC_HEADER_STDC 395 396 397dnl ************************ 398dnl Libraries 399dnl ************************ 400 401PKG_PROG_PKG_CONFIG 402 403# it is unclear to me if gio requires g_thread_init(), but if it does, we need to include gthread-2.0 404if test "x$native_win32" = "xyes"; then 405 GIO_PC="gio-2.0" 406else 407 GIO_PC="gio-unix-2.0" 408fi 409 410BF_dependencies="gtk+-3.0 >= 3.2.2 gdk-3.0" 411 412AC_ARG_WITH( 413 [gtk2], 414 AC_HELP_STRING( 415 [--with-gtk2], 416 [Use GTK2+ instead of GTK3+, even if GTK3+ is available @<:@default=no@:>@] 417 ) 418) 419 420dnl Be explicit here and dont accept --with-gtk2=foo 421if test "x$with_gtk2" != "xyes"; then 422 PKG_CHECK_EXISTS( 423 [$BF_dependencies], 424 [with_gtk3="yes"], 425 [with_gtk3="no"] 426 ) 427fi 428 429dnl Now if we did not find GTK3 or if GTK2 shall be used, check for it first 430dnl and fall back to GTK3 without any required minimum version. 431if test "x$with_gtk2" = "xyes" -o "x$with_gtk3" = "xno"; then 432 BF_dependencies="gtk+-2.0 >= 2.20 gdk-2.0" 433 PKG_CHECK_EXISTS( 434 [$BF_dependencies], 435 [with_gtk3="no"], 436 [ 437 BF_dependencies="gtk+-3.0 gdk-3.0" 438 with_gtk3="yes" 439 with_gtk2="no" 440 ] 441 ) 442fi 443 444BF_dependencies="\ 445$BF_dependencies \ 446glib-2.0 >= 2.24 \ 447gmodule-2.0 >= 2.24 \ 448gobject-2.0 \ 449pango \ 450gdk-pixbuf-2.0 \ 451$GIO_PC >= 2.24 \ 452gthread-2.0 \ 453libxml-2.0" 454 455if test "x$enable_spell_check" != "xno"; then 456 AC_MSG_CHECKING([for optional libenchant development files]) 457 PKG_CHECK_EXISTS( 458 [enchant], 459 [ 460 BF_dependencies="$BF_dependencies enchant" 461 AC_DEFINE([HAVE_LIBENCHANT], [1], [Define to 1 if you have the 'enchant' library (-lenchant).]) 462 PKG_CHECK_EXISTS( 463 [enchant >= 1.4], 464 [AC_DEFINE([HAVE_LIBENCHANT_1_4], [1], [Define to 1 if you have the 'enchant' library (-lenchant) >= 1.4.])] 465 ) 466 AC_MSG_RESULT([yes]) 467 ], 468 [ 469 AC_CHECK_HEADERS( 470 [enchant.h enchant/enchant.h], 471 AC_CHECK_LIB( 472 [enchant], 473 [enchant_dict_check], 474 [AC_MSG_RESULT([yes])], 475 [AC_MSG_RESULT([no])] 476 ) 477 ) 478 ] 479 ) 480 AC_MSG_CHECKING([for optional libenchant-2 development files]) 481 PKG_CHECK_EXISTS( 482 [enchant-2], 483 [ 484 BF_dependencies="$BF_dependencies enchant-2" 485 AC_DEFINE([HAVE_LIBENCHANT], [1], [Define to 1 if you have the 'enchant-2' library.]) 486 AC_DEFINE([HAVE_LIBENCHANT_2], [1], [Define to 1 if you have the 'enchant-2' library.]) 487 ] 488 AC_MSG_RESULT([yes]) 489 , 490 AC_MSG_RESULT([no]) 491 ) 492fi 493 494AC_MSG_NOTICE([checking for required development files]) 495PKG_CHECK_MODULES([BLUEFISH_REQUIRED], [$BF_dependencies]) 496 497# from https://sourceforge.net/apps/trac/gtk-osx/wiki/Integrate 498# to integrate bluefish in the OSX GUI 499AC_MSG_CHECKING([for Mac OSX integration]) 500if test "x$with_gtk3" != "xno"; then 501 _gdk_tgt=`$PKG_CONFIG --variable=targets gdk-3.0` 502else 503 _gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0` 504fi 505if test "x$_gdk_tgt" = "xquartz"; then 506 BF_gtkmacintegration="gtk-mac-integration" 507 AC_MSG_RESULT([gdk target is $_gdk_tgt]) 508 PKG_CHECK_MODULES( 509 [BLUEFISH_GTKMAC], 510 [$BF_gtkmacintegration], 511 [ 512 AC_DEFINE([MAC_INTEGRATION], [1], [Define to 1 for gtk Mac OSX integration.]) 513 ] 514 ) 515else 516 AC_MSG_RESULT([no]) 517fi 518 519 520# optionally build the charmap plugin if gucharmap is available 521AC_MSG_NOTICE([checking for optional libgucharmap development files]) 522if test "x$with_gtk3" != "xno"; then 523 PKG_CHECK_MODULES( 524 [CHARMAP_PLUGIN], 525 [gucharmap-2.90], 526 [ 527 build_charmap_plugin=yes 528 AC_DEFINE([HAVE_LIBGUCHARMAP_2], [1], [Define to 1 if you have the 'gucharmap-2.90' library (-lgucharmap).]) 529 ], 530 [ 531 build_charmap_plugin=no 532 AC_MSG_WARN([Disabling the building of the charmap plugin.]) 533 AC_MSG_WARN([Install gucharmap/gucharmap2.90 (>= 2.90) library/headers to build the plugin.]) 534 ] 535 ) 536else 537 PKG_CHECK_MODULES( 538 [CHARMAP_PLUGIN], 539 [gucharmap-2], 540 [ 541 build_charmap_plugin=yes 542 AC_DEFINE([HAVE_LIBGUCHARMAP_2], [1], [Define to 1 if you have the 'gucharmap-2' library (-lgucharmap).]) 543 ], 544 [PKG_CHECK_MODULES( 545 [CHARMAP_PLUGIN], 546 [gucharmap >= 2.20], 547 [ 548 build_charmap_plugin=yes 549 AC_DEFINE([HAVE_LIBGUCHARMAP], [1], [Define to 1 if you have the 'gucharmap' library (-lgucharmap).]) 550 ], 551 [ 552 build_charmap_plugin=no 553 AC_MSG_WARN([Disabling the building of the charmap plugin.]) 554 AC_MSG_WARN([Install gucharmap/gucharmap2 (>= 2.20) library/headers to build the plugin.]) 555 ] 556 )] 557 ) 558fi 559AM_CONDITIONAL([ENABLE_CHARMAP_PLUGIN], [test "x$build_charmap_plugin" = "xyes"]) 560 561AC_SEARCH_LIBS([log10], [m]) 562AC_SEARCH_LIBS([nanosleep], [posix4 rt]) 563 564AC_ARG_ENABLE( 565 [python], 566 AC_HELP_STRING( 567 [--disable-python], 568 [disable (or enable) python integration for zen-coding plugin @<:@default=yes@:>@] 569 ), 570 [enable_python="$enableval"], 571 [enable_python="yes"] 572) 573 574if test "x$enable_python" = "xyes" ; then 575 AC_MSG_NOTICE([searching for different python versions]) 576 577 AM_PATH_PYTHON([3.3], 578 AC_MSG_NOTICE([found python > 3.3]), 579 [ 580 AC_MSG_NOTICE([did not find python > 3.3]) 581 unset PYTHON 582 ] 583 ) 584 585 AM_PATH_PYTHON(,[ 586 AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config]) 587 AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config]) 588 AS_IF([test -z "$PYTHON_INCLUDE"], [ 589 AS_IF([test -z "$PYTHON_CONFIG"], [ 590 FULLPYTHONPATH=`which $PYTHON` 591 AC_PATH_PROGS([PYTHON_CONFIG], 592 [python$PYTHON_VERSION-config python-config], 593 [no], 594 [`dirname $FULLPYTHONPATH`]) 595 AS_IF([test "$PYTHON_CONFIG" = no], [enable_python=no]) 596 ]) 597 if test "x$enable_python" = "xyes" ; then 598 AC_MSG_CHECKING([python include flags]) 599 PYTHON_INCLUDE=`$PYTHON_CONFIG --includes` 600 AC_MSG_RESULT([$PYTHON_INCLUDE]) 601 CFLAGS="$CFLAGS $PYTHON_INCLUDE" 602 AC_MSG_CHECKING([python libs]) 603# beware, --embed is only available since python 3.8 604 AS_IF([PYTHON_LDFLAGS=`$PYTHON_CONFIG --embed --ldflags`],[],[PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`]) 605 AC_MSG_RESULT([$PYTHON_LDFLAGS]) 606 LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS" 607 fi 608 ])],[enable_python=no]) 609fi 610 611if test "x$enable_python" = "xyes"; then 612 AC_DEFINE([HAVE_PYTHON], [1], [Define to 1 if you have python installed.]) 613 AC_DEFINE_UNQUOTED([HAVE_PYTHON_VERSION], ["$PYTHON_VERSION"], [Define to python version.]) 614 build_zencoding_plugin=yes 615else 616 build_zencoding_plugin=no 617fi 618AM_CONDITIONAL([ENABLE_ZENCODING_PLUGIN], [test "x$build_zencoding_plugin" = "xyes"]) 619 620dnl ************************ 621dnl Header 622dnl ************************ 623 624AC_CHECK_HEADERS([stdlib.h unistd.h string.h strings.h errno.h stdio.h sys/stat.h ctype.h getopt.h math.h time.h sys/types.h fcntl.h netdb.h netinet/in.h sys/socket.h arpa/inet.h dirent.h sys/select.h sys/time.h sys/ipc.h sys/msg.h]) 625 626AC_CHECK_FUNCS([msgrcv msgsnd ctime ctime_r asctime asctime_r localtime strcasestr]) 627 628# test for bind(), accept(), socket(); #593801 and #602133 629AC_SEARCH_LIBS([bind], [socket ws2_32]) 630 631AC_CHECK_FUNCS_ONCE([bind socket accept]) 632 633dnl ************************** 634dnl Spell checker 635dnl ************************** 636 637AC_DEFINE([WITH_SPC], [1], [Don't define to 1 if you want to build without spell-checker.]) 638AC_FUNC_SELECT_ARGTYPES 639AC_HEADER_TIME 640 641dnl ************************** 642dnl Types 643dnl ************************** 644 645if test "x$native_win32" = "xno"; then 646 BF_TYPE_SOCKLEN_T 647fi 648 649dnl ************************ 650dnl Final Cflags/Libs 651dnl ************************ 652CFLAGS="$CFLAGS $BLUEFISH_REQUIRED_CFLAGS $BLUEFISH_GTKMAC_CFLAGS" 653LIBS="$LIBS $BLUEFISH_REQUIRED_LIBS $BLUEFISH_GTKMAC_LIBS" 654 655 656dnl ************************ 657dnl Locations 658dnl ************************ 659 660if test "$prefix" == "NONE"; then 661 AC_SUBST([prefix],[${ac_default_prefix}]) 662fi 663 664if test "$exec_prefix" == "NONE"; then 665 AC_SUBST([exec_prefix],[${prefix}]) 666fi 667 668if test -z "$localedir"; then 669 AC_SUBST([localedir],[${datadir}/locale]) 670fi 671 672if test -z "$docdir"; then 673 AC_SUBST( 674 [docdir], 675 [ 676 m4_ifset( 677 [AC_PACKAGE_TARNAME], 678 [${datadir}'/doc/${PACKAGE_TARNAME}'], 679 [${datadir}'/doc/${PACKAGE}'] 680 ) 681 ] 682 ) 683fi 684 685dnl ******************************* 686dnl Manpage macros 687dnl ******************************* 688BF_PROG_MAN 689BF_PROG_JING 690BF_PROG_XMLLINT 691BF_PROG_DFVAL 692 693 694dnl ******************************* 695dnl Output Makefiles 696dnl ******************************* 697AC_CONFIG_FILES([ 698 Makefile 699 data/Makefile 700 data/bflang/Makefile 701 data/bflib/Makefile 702 data/templates/Makefile 703 desktop-data/Makefile 704 images/Makefile 705 man/Makefile 706 po/Makefile.in 707 src/Makefile 708 src/pixmaps/Makefile 709 src/plugin_about/Makefile 710 src/plugin_about/po/Makefile.in 711 src/plugin_charmap/Makefile 712 src/plugin_charmap/po/Makefile.in 713 src/plugin_entities/Makefile 714 src/plugin_entities/po/Makefile.in 715 src/plugin_htmlbar/Makefile 716 src/plugin_htmlbar/pixmaps/Makefile 717 src/plugin_htmlbar/po/Makefile.in 718 src/plugin_htmlbar/ui/Makefile 719 src/plugin_infbrowser/Makefile 720 src/plugin_infbrowser/po/Makefile.in 721 src/plugin_snippets/Makefile 722 src/plugin_snippets/po/Makefile.in 723 src/plugin_zencoding/Makefile 724 src/plugin_zencoding/po/Makefile.in 725 src/bluefish_rc.rc.in 726 ui/Makefile 727 macosx/Makefile 728 win32/Makefile 729 win32/Makefile.mingw 730]) 731AC_OUTPUT 732 733# src/plugin_vcs/Makefile 734# src/plugin_xmltools/po/Makefile.in 735# src/plugin_xmltools/Makefile 736 737