1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980
|
dnl vi:set ts=8 sts=0 sw=8 tw=0:
dnl ---------------------------------------------------------------------------
dnl Process this file with autoconf to produce a configure script.
dnl $Id: configure.in,v 1.13 2000/05/10 15:26:04 kahn Exp kahn $
dnl ---------------------------------------------------------------------------
AC_INIT(src/main.c)
GNP_MAJOR_VERSION=1
GNP_MINOR_VERSION=3
GNP_MICRO_VERSION=3
GNP_VERSION=$GNP_MAJOR_VERSION.$GNP_MINOR_VERSION.${GNP_MICRO_VERSION}
dnl ---------------------------------------------------------------------------
dnl for automake:
dnl ---------------------------------------------------------------------------
AUTOMAKE_OPTIONS=no-dependencies
VERSION=$GNP_VERSION
PACKAGE=gnotepad+
dnl ---------------------------------------------------------------------------
dnl Initialize automake now
dnl ---------------------------------------------------------------------------
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AC_SUBST(GNP_VERSION)
AC_PREFIX_DEFAULT(/usr/local)
dnl ---------------------------------------------------------------------------
dnl checks for needed compilers
dnl ---------------------------------------------------------------------------
dnl CFLAGS=""
dnl if test x${CFLAGS+set} = xset ; then
dnl :
dnl else
dnl CFLAGS="-O2 -g"
dnl fi
AC_PROG_CC
dnl AC_PROG_CXX
dnl AC_PROG_RANLIB
dnl ---------------------------------------------------------------------------
dnl enable runtime debugging code
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING(whether to use runtime debugging code)
AC_ARG_ENABLE(
debug,
[ --enable-debug [default=no] use runtime debugging code],
,
[enable_debug="no"])
AC_MSG_RESULT($enable_debug)
if test "$enable_debug" = "yes"; then
AC_DEFINE(APP_DEBUG)
else
AC_DEFINE(G_DISABLE_ASSERT)
fi
dnl ---------------------------------------------------------------------------
dnl clean compiles
dnl ---------------------------------------------------------------------------
compiler_warnings=yes
AC_MSG_CHECKING(if we want compiler warnings)
AC_ARG_ENABLE(
warnings,
[ --enable-warnings [default=yes] enable gcc compiler warnings],
compiler_warnings="$enableval", compiler_warnings="yes"
)
AC_MSG_RESULT($compiler_warnings)
dnl ---------------------------------------------------------------------------
dnl ansi warnings
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING(whether to compile with strict ANSI)
AC_ARG_ENABLE(
ansi,
[ --enable-ansi [default=no] enable gcc strict ansi checking],
,
[enable_ansi="no"])
AC_MSG_RESULT($enable_ansi)
if test "$ac_cv_prog_CC" = gcc -o "$ac_cv_prog_CC" = g++; then
if test $compiler_warnings = yes; then
if echo "$CFLAGS" | grep "\-Wall" > /dev/null 2> /dev/null; then
CFLAGS="$CFLAGS"
else
echo "updating CFLAGS with extra '-Wall' option"
CFLAGS="$CFLAGS -Wall"
fi
if echo "$CFLAGS" | grep "\-Wmissing-prototypes" > /dev/null 2> /dev/null; then
CFLAGS="$CFLAGS"
else
echo "updating CFLAGS with extra '-Wmissing-prototypes' option"
CFLAGS="$CFLAGS -Wmissing-prototypes"
fi
dnl ---------------------------------------------------------------------------
dnl depending on the version of gcc used, using '-Wno-implicit-int' oppresses
dnl the ridiculous messages printed because of the X11 prototypes from the
dnl X11 headers. the downside to doing this, of course, is that code in
dnl the application itself which have implicit int declarations will go
dnl unnoticed. but oh well; whomever writes the code should be sure not to
dnl use any implicit declarations.
dnl ---------------------------------------------------------------------------
if echo "$CFLAGS" | grep "\-Wno-implicit-int" > /dev/null 2> /dev/null; then
CFLAGS="$CFLAGS"
else
echo "updating CFLAGS with extra '-Wno-implicit-int' option"
CFLAGS="$CFLAGS -Wno-implicit-int"
fi
fi
if test "$enable_ansi" = "yes"; then
if echo "$CFLAGS" | grep "\-ansi" > /dev/null 2> /dev/null; then
CFLAGS="$CFLAGS"
else
CFLAGS="$CFLAGS -ansi"
echo "updating CFLAGS with extra '-ansi' option"
fi
if echo "$CFLAGS" | grep "\-pedantic" > /dev/null 2> /dev/null; then
CFLAGS="$CFLAGS"
else
CFLAGS="$CFLAGS -pedantic"
echo "updating CFLAGS with extra '-pedantic' option"
fi
fi
fi
dnl ---------------------------------------------------------------------------
dnl now some other stuff
dnl AC_CANONICAL_HOST ... needs config.guess
dnl ---------------------------------------------------------------------------
AM_CONFIG_HEADER(config.h)
AM_SANITY_CHECK
dnl AC_PROG_LN_S
dnl ---------------------------------------------------------------------------
dnl checks for correctly defined types
dnl ---------------------------------------------------------------------------
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_MODE_T
AC_TYPE_UID_T
dnl AC_TYPE_GID_T oddly, this isn't present as of autoconf-2.13
dnl ---------------------------------------------------------------------------
dnl checks for header files & functions
dnl ---------------------------------------------------------------------------
AC_CHECK_HEADERS(libintl.h getopt.h)
AC_CHECK_FUNCS(getopt getopt_long)
dnl AC_CHECK_FUNCS(putenv)
dnl ---------------------------------------------------------------------------
dnl gnome
dnl ---------------------------------------------------------------------------
AC_DEFUN([GNOME_INIT_HOOK],
[
AC_SUBST(GNOME_LIBS)
AC_SUBST(GNOMEUI_LIBS)
dnl AC_SUBST(GNOMEGNORBA_LIBS)
AC_SUBST(GTKXMHTML_LIBS)
dnl AC_SUBST(GNOME_APPLET_LIBS)
AC_SUBST(GNOME_LIBDIR)
AC_SUBST(GNOME_INCLUDEDIR)
AC_ARG_WITH(gnome-includes,
[ --with-gnome-includes Specify location of GNOME headers],
[CFLAGS="$CFLAGS -I$withval"]
)
AC_ARG_WITH(gnome-libs,
[ --with-gnome-libs Specify location of GNOME libs],
[LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval]
)
AC_ARG_WITH(gnome,
[ --with-gnome Specify prefix for GNOME files],
if test x$withval = xyes; then
want_gnome=yes
ifelse([$1], [], :, [$1])
else
if test "x$withval" = xno; then
want_gnome=no
else
want_gnome=yes
LDFLAGS="$LDFLAGS -L$withval/lib"
CFLAGS="$CFLAGS -I$withval/include"
gnome_prefix=$withval/lib
fi
fi,
want_gnome=yes)
if test "x$want_gnome" = xyes; then
AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
if test "$GNOME_CONFIG" = "no"; then
no_gnome_config="yes"
else
AC_MSG_CHECKING(if $GNOME_CONFIG works)
if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
AC_MSG_RESULT(yes)
GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnomeui`"
GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnomeui`"
GLADE_LIBS="`$GNOME_CONFIG --libs-only-l libglade`"
GLADE_CFLAGS="`$GNOME_CONFIG --cflags libglade`"
GNOME_ALL_LIBS="`$GNOME_CONFIG --libs-only-l gnome gnomeui gtkxmhtml libglade`"
GNOME_ALL_LDFLAGS="`$GNOME_CONFIG --libs-only-L gnome gnomeui gtkxmhtml libglade`"
GNOME_ALL_CFLAGS="`$GNOME_CONFIG --cflags gnome gnomeui gtkxmhtml libglade`"
$1
else
AC_MSG_RESULT(no)
no_gnome_config="yes"
fi
fi
if test x$exec_prefix = xNONE; then
if test x$prefix = xNONE; then
gnome_prefix=$ac_default_prefix/lib
else
gnome_prefix=$prefix/lib
fi
else
gnome_prefix=`eval echo \`echo $libdir\``
fi
if test "$no_gnome_config" = "yes"; then
AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
if test -f $gnome_prefix/gnomeConf.sh; then
AC_MSG_RESULT(found)
echo "loading gnome configuration from" \
"$gnome_prefix/gnomeConf.sh"
. $gnome_prefix/gnomeConf.sh
$1
else
AC_MSG_RESULT(not found)
if test x$2 = xfail; then
AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
fi
fi
fi
fi
])
AC_DEFUN([GNOME_INIT],[
GNOME_INIT_HOOK([],fail)
])
dnl ---------------------------------------------------------------------------
dnl check for gnome crap
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING(whether to use over-hyped gnome)
AC_ARG_ENABLE(gnome,
[ --enable-gnome [default=yes] if present, use GNOME],
enable_gnome="$enableval",enable_gnome="yes")
if test x$enable_gnome != xno ; then
AC_MSG_RESULT(yes (bleh, what's the big deal?))
GNOME_INIT_HOOK([have_gnome=yes])
else
AC_MSG_RESULT(no (don't believe the hype))
fi
AM_CONDITIONAL(HAVE_GNOME, test x$have_gnome = xyes)
if test x$have_gnome = xyes ; then
AC_DEFINE(USE_GNOME)
CFLAGS="$CFLAGS $GNOME_ALL_CFLAGS"
LDFLAGS="$LDFLAGS $GNOME_ALL_LDFLAGS"
LIBS="$LIBS $GNOME_ALL_LIBS"
else
GNOME_CONFIG=echo
fi
dnl ---------------------------------------------------------------------------
dnl check for libglade crap
dnl ---------------------------------------------------------------------------
use_glade=yes
AC_MSG_CHECKING(whether to use libglade)
AC_ARG_ENABLE(
glade,
[ --enable-glade [default=yes] if present, use libglade],
use_glade="$enableval", use_glade="yes"
)
AC_MSG_RESULT($use_glade)
if test "$use_glade" = "yes"; then
echo "checking additional requirements for libglade..."
if test "$have_gnome" = "yes"; then
AC_CHECK_LIB(glade, glade_xml_new, use_glade="yes", use_glade="no")
if test "$use_glade" = "yes"; then
AC_DEFINE(USE_LIBGLADE)
else
echo "not using libglade (could not compile w/library)"
fi
else
echo "not using libglade (needs GNOME)"
use_glade="no"
fi
fi
dnl ---------------------------------------------------------------------------
dnl check for GTK
dnl ---------------------------------------------------------------------------
AM_PATH_GTK(1.0.5,
[SAVE_GTK_LIBS="$GTK_LIBS"
SAVE_GTK_CFLAGS="$GTK_CFLAGS"],
AC_MSG_ERROR(Cannot find GTK+: Is gtk-config in executable path?))
dnl ---------------------------------------------------------------------------
dnl doc loading/unloading to conserve memory
dnl ---------------------------------------------------------------------------
want_docunload=yes
AC_MSG_CHECKING(whether to unload unchanged docs to save memory)
AC_ARG_ENABLE(
docunload,
[ --enable-docunload [default=yes] unload unchanged docs to save memory],
want_docunload="$enableval", want_docunload="yes"
)
AC_MSG_RESULT($want_docunload)
if test "$want_docunload" = "yes"; then
AC_DEFINE(WANT_DOCUNLOAD)
fi
dnl ---------------------------------------------------------------------------
dnl splash screen
dnl ---------------------------------------------------------------------------
want_splash=yes
AC_MSG_CHECKING(whether to allow startup splash screen)
AC_ARG_ENABLE(
splash,
[ --enable-splash [default=yes] allow startup splash screen],
want_splash="$enableval", want_splash="yes"
)
AC_MSG_RESULT($want_splash)
if test "$want_splash" = "yes"; then
AC_DEFINE(WANT_SPLASH)
fi
dnl ---------------------------------------------------------------------------
dnl session saving/restoring
dnl ---------------------------------------------------------------------------
want_session=yes
AC_MSG_CHECKING(whether to allow session saving/restoring)
AC_ARG_ENABLE(
session,
[ --enable-session [default=yes] allow session saving/restoring],
want_session="$enableval", want_session="yes"
)
AC_MSG_RESULT($want_session)
if test "$want_session" = "yes"; then
AC_DEFINE(WANT_SESSION)
fi
dnl ---------------------------------------------------------------------------
dnl use cut&paste clipboard
dnl ---------------------------------------------------------------------------
use_clipboard=yes
AC_MSG_CHECKING(whether we want cut & paste features)
AC_ARG_ENABLE(
clipboard,
[ --enable-clipboard [default=yes] cut & paste features],
use_clipboard="$enableval", use_clipboard="yes"
)
AC_MSG_RESULT($use_clipboard)
if test "$use_clipboard" = "yes"; then
AC_DEFINE(USE_CLIPBOARD)
fi
dnl ---------------------------------------------------------------------------
dnl enable undo/redo
dnl ---------------------------------------------------------------------------
use_undoredo=yes
AC_MSG_CHECKING(whether we want unlimited undo/redo)
AC_ARG_ENABLE(
undoredo,
[ --enable-undoredo [default=yes] unlimited undo/redo],
use_undoredo="$enableval", use_undoredo="yes"
)
AC_MSG_RESULT($use_undoredo)
if test "$use_undoredo" = "yes"; then
AC_DEFINE(USE_UNDOREDO)
fi
dnl ---------------------------------------------------------------------------
dnl enable search & replace
dnl ---------------------------------------------------------------------------
use_search=yes
AC_MSG_CHECKING(whether we want search and replace)
AC_ARG_ENABLE(
search,
[ --enable-search [default=yes] search and replace],
use_search="$enableval", use_search="yes"
)
AC_MSG_RESULT($use_search)
if test "$use_search" = "yes"; then
AC_DEFINE(USE_SEARCH)
fi
dnl ---------------------------------------------------------------------------
dnl use regex searches
dnl ---------------------------------------------------------------------------
use_regex_search=yes
AC_MSG_CHECKING(whether to enable regular expression searches)
AC_ARG_ENABLE(
regex-search,
[ --enable-regex-search [default=yes] regular expression searches],
use_regex_search="$enableval", use_regex_search="yes"
)
AC_MSG_RESULT($use_regex_search)
if test "$use_regex_search" = "yes"; then
AC_CHECK_HEADERS(regex.h)
AC_CHECK_FUNCS(regexec)
AC_CHECK_FUNCS(regcomp)
AC_CHECK_FUNCS(regerror)
AC_CHECK_FUNCS(regfree)
fi
dnl ---------------------------------------------------------------------------
dnl enable recent document list
dnl ---------------------------------------------------------------------------
use_recent=yes
AC_MSG_CHECKING(whether to track recently opened documents)
AC_ARG_ENABLE(
recent,
[ --enable-recent [default=yes] opening recent documents],
use_recent="$enableval", use_recent="yes"
)
AC_MSG_RESULT($use_recent)
if test "$use_recent" = "yes"; then
AC_DEFINE(USE_RECENT)
fi
dnl ---------------------------------------------------------------------------
dnl enable autosave
dnl ---------------------------------------------------------------------------
use_autosave=yes
AC_MSG_CHECKING(whether to enable document autosave)
AC_ARG_ENABLE(
autosave,
[ --enable-autosave [default=yes] document autosave],
use_autosave="$enableval", use_autosave="yes"
)
AC_MSG_RESULT($use_autosave)
if test "$use_autosave" = "yes"; then
AC_DEFINE(USE_AUTOSAVE)
fi
dnl ---------------------------------------------------------------------------
dnl enable file backup
dnl ---------------------------------------------------------------------------
use_backup=yes
AC_MSG_CHECKING(whether to enable file backup before saving)
AC_ARG_ENABLE(
backup,
[ --enable-backup [default=yes] file backup before saving],
use_backup="$enableval", use_backup="yes"
)
AC_MSG_RESULT($use_backup)
if test "$use_backup" = "yes"; then
AC_DEFINE(USE_BACKUP)
fi
dnl ---------------------------------------------------------------------------
dnl enable inserting shell output
dnl ---------------------------------------------------------------------------
use_shellinsert=yes
AC_MSG_CHECKING(whether to enable inserting shell output)
AC_ARG_ENABLE(
shell-insert,
[ --enable-shell-insert [default=yes] inserting shell output],
use_shellinsert="$enableval", use_shellinsert="yes"
)
AC_MSG_RESULT($use_shellinsert)
if test "$use_shellinsert" = "yes"; then
AC_DEFINE(USE_SHELL_INSERT)
fi
dnl ---------------------------------------------------------------------------
dnl use toolbars
dnl ---------------------------------------------------------------------------
use_toolbars=yes
AC_MSG_CHECKING(whether we want toolbars or not)
AC_ARG_ENABLE(
toolbars,
[ --enable-toolbars [default=yes] configurable toolbars],
use_toolbars="$enableval", use_toolbars="yes"
)
AC_MSG_RESULT($use_toolbars)
if test "$use_toolbars" = "yes"; then
AC_DEFINE(USE_TOOLBARS)
fi
dnl ---------------------------------------------------------------------------
dnl use doc list
dnl ---------------------------------------------------------------------------
use_doclist=yes
AC_MSG_CHECKING(whether to enable document list)
AC_ARG_ENABLE(
doclist,
[ --enable-doclist [default=yes] document list],
use_doclist="$enableval", use_doclist="yes"
)
AC_MSG_RESULT($use_doclist)
if test "$use_doclist" = "yes"; then
AC_DEFINE(USE_DOCLIST)
fi
dnl ---------------------------------------------------------------------------
dnl use fileinfo
dnl ---------------------------------------------------------------------------
use_fileinfo=yes
AC_MSG_CHECKING(whether to document/file info)
AC_ARG_ENABLE(
fileinfo,
[ --enable-fileinfo [default=yes] document/file info],
use_fileinfo="$enableval", use_fileinfo="yes"
)
AC_MSG_RESULT($use_fileinfo)
if test "$use_fileinfo" = "yes"; then
AC_DEFINE(USE_FILEINFO)
fi
dnl ---------------------------------------------------------------------------
dnl use win list
dnl ---------------------------------------------------------------------------
use_winlist=yes
AC_MSG_CHECKING(whether to enable window list)
AC_ARG_ENABLE(
winlist,
[ --enable-winlist [default=yes] window list],
use_winlist="$enableval", use_winlist="yes"
)
AC_MSG_RESULT($use_winlist)
if test "$use_winlist" = "yes"; then
AC_DEFINE(USE_WINLIST)
fi
dnl ---------------------------------------------------------------------------
dnl enable random tips
dnl ---------------------------------------------------------------------------
use_rtips=yes
AC_MSG_CHECKING(whether to enable random tips or not)
AC_ARG_ENABLE(
random-tips,
[ --enable-random-tips [default=yes] random tips (e.g., fortune)],
use_rtips="$enableval", use_rtips="yes"
)
AC_MSG_RESULT($use_rtips)
if test "$use_rtips" = "yes"; then
AC_DEFINE(USE_RANDOMTIPS)
fi
dnl ---------------------------------------------------------------------------
dnl use message box
dnl ---------------------------------------------------------------------------
use_msgbox=yes
AC_MSG_CHECKING(whether to enable message box for logging)
AC_ARG_ENABLE(
msgbox,
[ --enable-msgbox [default=yes] message box for logging messages],
use_msgbox="$enableval", use_msgbox="yes"
)
AC_MSG_RESULT($use_msgbox)
if test "$use_msgbox" = "yes"; then
AC_DEFINE(WANT_MSGBOX)
fi
dnl ---------------------------------------------------------------------------
dnl use html tag insertion features
dnl ---------------------------------------------------------------------------
use_htmltags=yes
AC_MSG_CHECKING(whether to enable features for inserting HTML tags)
AC_ARG_ENABLE(
htmltags,
[ --enable-htmltags [default=yes] html tag insertion features],
use_htmltags="$enableval", use_htmltags="yes"
)
AC_MSG_RESULT($use_htmltags)
if test "$use_htmltags" = "yes"; then
AC_DEFINE(USE_HTMLTAGS)
fi
dnl ---------------------------------------------------------------------------
dnl use source code control options
dnl ---------------------------------------------------------------------------
use_srcctrl=yes
AC_MSG_CHECKING(whether to enable source code control options)
AC_ARG_ENABLE(
srcctrl,
[ --enable-srcctrl [default=yes] source code control options],
use_srcctrl="$enableval", use_srcctrl="yes"
)
AC_MSG_RESULT($use_srcctrl)
if test "$use_srcctrl" = "yes"; then
AC_DEFINE(USE_SOURCE_CTRL)
fi
dnl ---------------------------------------------------------------------------
dnl use enhanced file selection dialog
dnl ---------------------------------------------------------------------------
use_efilesel=yes
AC_MSG_CHECKING(whether to enable the enhanced file selection dialog)
AC_ARG_ENABLE(
efilesel,
[ --enable-efilesel [default=yes] enhanced file selection dialog],
use_efilesel="$enableval", use_efilesel="yes"
)
AC_MSG_RESULT($use_efilesel)
if test "$use_efilesel" = "yes"; then
AC_DEFINE(USE_ENHANCED_FSEL)
fi
dnl ---------------------------------------------------------------------------
dnl use flock for file locking
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING(whether to use flock() to lock files)
AC_ARG_ENABLE(
flock,
[ --enable-flock [default=no] use flock() to lock files],
,
[use_flock="no"]
)
AC_MSG_RESULT($use_flock)
if test "$use_flock" = "yes"; then
AC_DEFINE(USE_FLOCK)
fi
dnl ---------------------------------------------------------------------------
dnl use fcntl for file locking (default)
dnl ---------------------------------------------------------------------------
use_fcntl=yes
AC_MSG_CHECKING(whether to use fcntl() to lock files)
AC_ARG_ENABLE(
fcntl,
[ --enable-fcntl [default=yes] use fcntl() to lock files],
use_fcntl="$enableval", use_fcntl="yes"
)
AC_MSG_RESULT($use_fcntl)
if test "$use_fcntl" = "yes"; then
AC_DEFINE(USE_FCNTL)
fi
dnl ---------------------------------------------------------------------------
dnl project
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING(whether to use project management features)
AC_ARG_ENABLE(
project,
[ --enable-project [default=no] use project management features],,
[use_project="no"])
AC_MSG_RESULT($use_project)
if test "$use_project" = "yes"; then
AC_DEFINE(WANT_PROJECT)
fi
dnl ---------------------------------------------------------------------------
dnl use gtk-xmhtml to view html files
dnl ---------------------------------------------------------------------------
use_xmhtml=yes
if test "$have_gnome" = "yes"; then
AC_DEFINE(USE_GTKXMHTML)
else
AC_MSG_CHECKING(whether to use gtk-xmhtml to view html)
AC_ARG_ENABLE(
gtk-xmhtml,
[ --enable-gtk-xmhtml [default=yes] if present, use gtk-xmhtml to view HTML],
use_xmhtml="$enableval", use_xmhtml="yes"
)
AC_MSG_RESULT($use_xmhtml)
if test "$use_xmhtml" = "yes"; then
echo "checking additional requirements for gtk-xmhtml..."
AM_PATH_GTK(1.1.12,
[SAVE_GTK_LIBS="$GTK_LIBS"
SAVE_GTK_CFLAGS="$GTK_CFLAGS"],
use_xmhtml="no"
)
if test "$use_xmhtml" = "no"; then
echo "not using gtk-xmhtml (needs gtk+-1.1.x)"
GTK_CFLAGS=$SAVE_GTK_CFLAGS
GTK_LIBS=$SAVE_GTK_LIBS
else
OLD_CFLAGS=$CFLAGS
OLD_LIBS=$LIBS
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS -lgtkxmhtml"
AC_CHECK_LIB(gtkxmhtml, gtk_xmhtml_new,
use_xmhtml="yes", use_xmhtml="no")
CFLAGS=$OLD_CFLAGS
LIBS=$OLD_LIBS
if test "$use_xmhtml" = "yes"; then
AC_DEFINE(USE_GTKXMHTML)
LIBS="$LIBS -lgtkxmhtml"
else
echo "not using gtk-xmhtml (library not found)"
fi
fi
fi
fi
use_gtkhtml=yes
AC_MSG_CHECKING(whether to use gtkhtml to view html)
AC_ARG_ENABLE(
gtkhtml,
[ --enable-gtkhtml [default=yes] if present, use gtkhtml to view HTML],
use_gtkhtml="$enableval", use_gtkhtml="yes"
)
AC_MSG_RESULT($use_gtkhtml)
if test "$use_gtkhtml" = "yes"; then
echo "checking additional requirements for gtkhtml..."
if test "$have_gnome" = "yes"; then
OLD_LIBS=$LIBS
LIBS="$LIBS `gnome-config --libs gtkhtml`"
CFLAGS="$CFLAGS `gnome-config --cflags gtkhtml`"
AC_CHECK_LIB(gtkhtml, gtk_html_new, use_gtkhtml="yes", use_gtkhtml="no")
LIBS=$OLD_LIBS
if test "$use_gtkhtml" = "yes"; then
AC_DEFINE(USE_GTKHTML)
LIBS="$LIBS `gnome-config --libs gtkhtml`"
CFLAGS="$CFLAGS `gnome-config --cflags gtkhtml`"
else
echo "not using gtkhtml (could not compile w/library)"
fi
else
echo "not using gtkhtml (needs GNOME)"
use_gtkhtml="no"
fi
fi
dnl ---------------------------------------------------------------------------
dnl add GTK_CFLAGS and GTK_LIBS to CFLAGS and LDFLAGS
dnl ---------------------------------------------------------------------------
if test "$have_gnome" != "yes"; then
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
fi
dnl i18n stuff
ALL_LINGUAS="da fr ja"
AM_GNU_GETTEXT
gnplocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(gnplocaledir)
dnl ---------------------------------------------------------------------------
dnl this is gnotepad+
dnl ---------------------------------------------------------------------------
AC_DEFINE(APP_GNP)
dnl ---------------------------------------------------------------------------
dnl Makefiles to create:
dnl ---------------------------------------------------------------------------
AC_OUTPUT([Makefile src/Makefile src/xpm/Makefile docs/Makefile docs/C/Makefile
po/Makefile.in intl/Makefile gnotepad+.spec],
[
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
])
dnl ---------------------------------------------------------------------------
dnl output our configuration
dnl ---------------------------------------------------------------------------
echo
echo these are the options selected:
echo
if test "$compiler_warnings" = "yes"; then
echo " gcc compiler warnings : YES"
else
echo " gcc compiler warnings : NO"
fi
if test "$enable_ansi" = "yes"; then
echo " gcc compile with strict ansi : YES"
else
echo " gcc compile with strict ansi : NO"
fi
if test "$enable_debug" = "yes"; then
echo " runtime debugging code : YES"
else
echo " runtime debugging code : NO"
fi
if test "$have_gnome" = "yes"; then
echo " using over-hyped gnome : YES"
else
echo " using over-hyped gnome : NO"
fi
if test "$want_docunload" = "yes"; then
echo " unload unchanged documents : YES"
else
echo " unload unchanged documents : NO"
fi
if test "$want_splash" = "yes"; then
echo " splash screen on startup : YES"
else
echo " splash screen on startup : NO"
fi
if test "$want_session" = "yes"; then
echo " session saving/restoring : YES"
else
echo " session saving/restoring : NO"
fi
if test "$use_clipboard" = "yes"; then
echo " cut and paste features : YES"
else
echo " cut and paste features : NO"
fi
if test "$use_undoredo" = "yes"; then
echo " undo and redo features : YES"
else
echo " undo and redo features : NO"
fi
if test "$use_search" = "yes"; then
echo " search and replace : YES"
else
echo " search and replace : NO"
fi
if test "$use_regex_search" = "yes"; then
echo " regular expression searches : YES"
else
echo " regular expression searches : NO"
fi
if test "$use_recent" = "yes"; then
echo " enable opening recent docs : YES"
else
echo " enable opening recent docs : NO"
fi
if test "$use_autosave" = "yes"; then
echo " autosave documents : YES"
else
echo " autosave documents : NO"
fi
if test "$use_backup" = "yes"; then
echo " backup files before saving : YES"
else
echo " backup files before saving : NO"
fi
if test "$use_shellinsert" = "yes"; then
echo " enable inserting shell output : YES"
else
echo " enable inserting shell output : NO"
fi
if test "$use_toolbars" = "yes"; then
echo " enable toolbars : YES"
else
echo " enable toolbars : NO"
fi
if test "$use_doclist" = "yes"; then
echo " document list feature : YES"
else
echo " document list feature : NO"
fi
if test "$use_fileinfo" = "yes"; then
echo " document/file info feature : YES"
else
echo " document/file info feature : NO"
fi
if test "$use_winlist" = "yes"; then
echo " window list feature : YES"
else
echo " window list feature : NO"
fi
if test "$use_rtips" = "yes"; then
echo " show random tips : YES"
else
echo " show random tips : NO"
fi
if test "$use_msgbox" = "yes"; then
echo " message box for logging : YES"
else
echo " message box for logging : NO"
fi
if test "$use_htmltags" = "yes"; then
echo " HTML tag insertion features : YES"
else
echo " HTML tag insertion features : NO"
fi
if test "$use_srcctrl" = "yes"; then
echo " source code control options : YES"
else
echo " source code control options : NO"
fi
if test "$use_efilesel" = "yes"; then
echo " enhanced file selection dlg : YES"
else
echo " enhanced file selection dlg : NO"
fi
if test "$use_flock" = "yes"; then
echo " lock files with flock() : YES"
else
echo " lock files with flock() : NO"
fi
if test "$use_fcntl" = "yes"; then
echo " lock files with fcntl() : YES"
else
echo " lock files with fcntl() : NO"
fi
if test "$use_project" = "yes"; then
echo " experimental project features : YES"
else
echo " experimental project features : NO"
fi
if test "$use_xmhtml" = "yes"; then
echo " gtk-xmhtml to view html : YES"
else
echo " gtk-xmhtml to view html : NO"
fi
if test "$use_gtkhtml" = "yes"; then
echo " gtkhtml to view html : YES"
else
echo " gtkhtml to view html : NO"
fi
echo
|