diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 301 |
1 files changed, 156 insertions, 145 deletions
diff --git a/configure.in b/configure.in index 73662ae..2766054 100644 --- a/configure.in +++ b/configure.in | |||
@@ -18,6 +18,13 @@ AC_PROG_CXX | |||
18 | AC_PROG_INSTALL | 18 | AC_PROG_INSTALL |
19 | AC_PROG_RANLIB | 19 | AC_PROG_RANLIB |
20 | 20 | ||
21 | AC_C_CONST | ||
22 | AC_C_INLINE | ||
23 | |||
24 | AC_TYPE_PID_T | ||
25 | AC_TYPE_SIZE_T | ||
26 | |||
27 | |||
21 | AC_CHECK_PROGS(regex_cmd, sed) | 28 | AC_CHECK_PROGS(regex_cmd, sed) |
22 | if test x$regex_cmd = "x"; then | 29 | if test x$regex_cmd = "x"; then |
23 | AC_MSG_ERROR([error. sed is required to build the data files.]) | 30 | AC_MSG_ERROR([error. sed is required to build the data files.]) |
@@ -25,12 +32,15 @@ fi | |||
25 | 32 | ||
26 | dnl Check for system header files | 33 | dnl Check for system header files |
27 | AC_HEADER_STDC | 34 | AC_HEADER_STDC |
35 | AC_HEADER_STDBOOL | ||
28 | AC_CHECK_HEADERS(errno.h ctype.h dirent.h fcntl.h libgen.h \ | 36 | AC_CHECK_HEADERS(errno.h ctype.h dirent.h fcntl.h libgen.h \ |
29 | locale.h nl_types.h process.h signal.h stdarg.h \ | 37 | locale.h nl_types.h process.h signal.h stdarg.h \ |
30 | stdio.h time.h unistd.h \ | 38 | stdio.h time.h unistd.h \ |
31 | sys/param.h sys/select.h sys/signal.h sys/stat.h \ | 39 | sys/param.h sys/select.h sys/signal.h sys/stat.h \ |
32 | sys/time.h sys/types.h sys/wait.h \ | 40 | sys/time.h sys/types.h sys/wait.h \ |
33 | iconv.h) | 41 | langinfo.h iconv.h) |
42 | |||
43 | |||
34 | 44 | ||
35 | AC_CHECK_HEADERS(sstream, , | 45 | AC_CHECK_HEADERS(sstream, , |
36 | [ AC_CHECK_HEADERS(strstream,, | 46 | [ AC_CHECK_HEADERS(strstream,, |
@@ -40,11 +50,21 @@ AC_CHECK_HEADERS(sstream, , | |||
40 | 50 | ||
41 | AC_CHECK_HEADERS(cassert cctype cerrno cmath cstdarg cstdio cstdlib cstring ctime) | 51 | AC_CHECK_HEADERS(cassert cctype cerrno cmath cstdarg cstdio cstdlib cstring ctime) |
42 | 52 | ||
43 | AC_HEADER_TIME | ||
44 | 53 | ||
45 | dnl Check for existance of basename(), setlocale() and strftime() | 54 | dnl Check for existance of basename(), setlocale() and strftime() |
55 | AC_FUNC_CLOSEDIR_VOID | ||
56 | AC_FUNC_ERROR_AT_LINE | ||
57 | AC_FUNC_FORK | ||
58 | AC_FUNC_MALLOC | ||
59 | AC_FUNC_REALLOC | ||
60 | AC_FUNC_SELECT_ARGTYPES | ||
61 | AC_FUNC_STAT | ||
62 | |||
46 | AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename, LIBS="$LIBS -lgen")) | 63 | AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename, LIBS="$LIBS -lgen")) |
47 | AC_CHECK_FUNCS(getpid setlocale sigaction strcasestr snprintf vsnprintf catopen catgets catclose) | 64 | AC_CHECK_FUNCS(catclose catgets catopen getpid gettimeofday memset mkdir \ |
65 | nl_langinfo putenv regcomp select setenv setlocale sigaction snprintf \ | ||
66 | sqrt strcasecmp strcasestr strchr strstr strtol strtoul vsnprintf) | ||
67 | |||
48 | dnl The autoconf test for strftime is broken now (due to gcc 3.3 bug?): | 68 | dnl The autoconf test for strftime is broken now (due to gcc 3.3 bug?): |
49 | dnl Gcc 3.3 testprog = ``extern "C" char strftime;'', build with g++ test.cc | 69 | dnl Gcc 3.3 testprog = ``extern "C" char strftime;'', build with g++ test.cc |
50 | dnl breaks with: | 70 | dnl breaks with: |
@@ -69,6 +89,8 @@ size_t x = strftime(s, 5, "%a", localtime(&t)); | |||
69 | [AC_MSG_RESULT(no)]) | 89 | [AC_MSG_RESULT(no)]) |
70 | 90 | ||
71 | 91 | ||
92 | AC_STRUCT_TM | ||
93 | |||
72 | dnl --------------- | 94 | dnl --------------- |
73 | dnl CHECK FOR ICONV | 95 | dnl CHECK FOR ICONV |
74 | dnl --------------- | 96 | dnl --------------- |
@@ -177,24 +199,6 @@ fi | |||
177 | 199 | ||
178 | Xext_lib="" | 200 | Xext_lib="" |
179 | 201 | ||
180 | dnl Check for XShape extension support and proper library files. | ||
181 | AC_MSG_CHECKING([whether to build support for the XShape extension]) | ||
182 | AC_ARG_ENABLE( | ||
183 | shape, [ --enable-shape enable support of the XShape extension ([default=yes])], | ||
184 | if test x$enableval = "xyes"; then | ||
185 | AC_MSG_RESULT([yes]) | ||
186 | AC_CHECK_LIB(Xext, XShapeCombineShape, | ||
187 | AC_DEFINE(SHAPE, 1, "shaped window support") | ||
188 | LIBS="$LIBS -lXext") | ||
189 | else | ||
190 | AC_MSG_RESULT([no]) | ||
191 | fi, | ||
192 | |||
193 | AC_MSG_RESULT([yes]) | ||
194 | AC_CHECK_LIB(Xext, XShapeCombineShape, | ||
195 | AC_DEFINE(SHAPE, 1, "shaped window support") | ||
196 | LIBS="$LIBS -lXext") | ||
197 | ) | ||
198 | 202 | ||
199 | dnl Check for the Slit | 203 | dnl Check for the Slit |
200 | AC_MSG_CHECKING([whether to include the Slit]) | 204 | AC_MSG_CHECKING([whether to include the Slit]) |
@@ -476,60 +480,129 @@ AC_ARG_ENABLE( | |||
476 | ) | 480 | ) |
477 | AM_CONDITIONAL(MULTIBYTE, test x$MULTIBYTE = xtrue) | 481 | AM_CONDITIONAL(MULTIBYTE, test x$MULTIBYTE = xtrue) |
478 | 482 | ||
479 | AC_MSG_CHECKING([whether to have RANDR (The X Resize and Rotate Extension) support]) | 483 | |
480 | AC_ARG_ENABLE( | 484 | dnl Check for Xinerama support and proper library files. |
481 | randr, | 485 | enableval="yes" |
482 | [ --enable-randr RANDR (The X Resize and Rotate Extension) support ([default=yes])], | 486 | AC_MSG_CHECKING([whether to build support for the Xinerama extension]) |
483 | if test x$enableval = "xyes"; then | 487 | AC_ARG_ENABLE(xinerama, |
484 | AC_MSG_RESULT([yes]) | 488 | AC_HELP_STRING([--enable-xinerama], |
485 | AC_CHECK_LIB(Xrandr, XRRQueryExtension, | 489 | [enable support of the Xinerama extension [default=yes]]), , |
486 | AC_DEFINE(HAVE_RANDR, 1, "randr support") | 490 | [enableval=yes]) |
487 | LIBS="$LIBS -lXrandr") | 491 | if test "x$enableval" = "xyes"; then |
488 | else | 492 | AC_MSG_RESULT([yes]) |
489 | AC_MSG_RESULT([no]) | 493 | AC_CHECK_LIB(Xinerama, XineramaQueryScreens, |
490 | fi, | 494 | AC_MSG_CHECKING([for X11/extensions/Xinerama.h]) |
495 | AC_TRY_COMPILE( | ||
496 | #include <X11/Xlib.h> | ||
497 | #include <X11/Xutil.h> | ||
498 | #include <X11/extensions/Xinerama.h> | ||
499 | , XineramaQueryScreens(0, 0), | ||
500 | AC_MSG_RESULT([yes]) | ||
501 | AC_DEFINE(XINERAMA, [1], [Define to 1 if you have XINERAMA]) | ||
502 | LIBS="$LIBS -lXinerama", | ||
503 | AC_MSG_RESULT([no]))) | ||
504 | else | ||
505 | AC_MSG_RESULT([no]) | ||
506 | CONFIGOPTS="$CONFIGOPTS --disable-xinerama" | ||
507 | fi | ||
508 | |||
509 | dnl Check for XShape extension support and proper library files. | ||
510 | enableval="yes" | ||
511 | AC_MSG_CHECKING([whether to build support for the XShape extension]) | ||
512 | AC_ARG_ENABLE(shape, | ||
513 | AC_HELP_STRING([--enable-shape], | ||
514 | [enable support of the XShape extension [default=yes]]), , | ||
515 | [enableval=yes]) | ||
516 | if test "x$enableval" = "xyes"; then | ||
517 | AC_MSG_RESULT([yes]) | ||
518 | AC_CHECK_LIB(Xext, XShapeCombineShape, | ||
519 | AC_MSG_CHECKING([for X11/extensions/shape.h]) | ||
520 | AC_TRY_COMPILE( | ||
521 | #include <X11/Xlib.h> | ||
522 | #include <X11/Xutil.h> | ||
523 | #include <X11/extensions/shape.h> | ||
524 | , long foo = ShapeSet, | ||
525 | AC_MSG_RESULT([yes]) | ||
526 | AC_DEFINE(SHAPE, [1], [Define to 1 if you have SHAPE]) | ||
527 | LIBS="$LIBS -lXext" | ||
528 | FEATURES="$FEATURES XShape", | ||
529 | AC_MSG_RESULT([no]))) | ||
530 | else | ||
531 | AC_MSG_RESULT([no]) | ||
532 | CONFIGOPTS="$CONFIGOPTS --disable-shape" | ||
533 | fi | ||
534 | |||
535 | |||
536 | |||
537 | dnl Check for RANDR support and proper library files. | ||
538 | enableval="yes" | ||
539 | AC_MSG_CHECKING([whether to build support for the Xrandr (X resize and rotate) extension]) | ||
540 | AC_ARG_ENABLE(randr, | ||
541 | AC_HELP_STRING([--enable-randr], | ||
542 | [enable support of the Xrandr extension [default=yes]]), , | ||
543 | [enableval=yes]) | ||
544 | if test "x$enableval" = "xyes"; then | ||
491 | AC_MSG_RESULT([yes]) | 545 | AC_MSG_RESULT([yes]) |
492 | AC_CHECK_LIB(Xrandr, XRRQueryExtension, | 546 | AC_CHECK_LIB(Xrandr, XRRQueryExtension, |
493 | AC_DEFINE(HAVE_RANDR, 1, "randr support") | 547 | AC_MSG_CHECKING([for X11/extensions/Xrandr.h]) |
494 | LIBS="$LIBS -lXrandr") | 548 | AC_TRY_COMPILE( |
495 | ) | 549 | #include <X11/Xlib.h> |
550 | #include <X11/Xutil.h> | ||
551 | #include <X11/extensions/Xrandr.h> | ||
552 | , XRRQueryExtension(0, 0, 0), | ||
553 | AC_MSG_RESULT([yes]) | ||
554 | AC_DEFINE(HAVE_RANDR, [1], [Define to 1 if you have RANDR]) | ||
555 | LIBS="$LIBS -lXrandr", | ||
556 | AC_MSG_RESULT([no]))) | ||
557 | else | ||
558 | AC_MSG_RESULT([no]) | ||
559 | CONFIGOPTS="$CONFIGOPTS --disable-randr" | ||
560 | fi | ||
496 | 561 | ||
562 | enableval="yes" | ||
497 | AC_MSG_CHECKING([whether to have RANDR 1.2 support]) | 563 | AC_MSG_CHECKING([whether to have RANDR 1.2 support]) |
498 | AC_ARG_ENABLE( | 564 | AC_ARG_ENABLE(randr1.2, |
499 | randr1.2, | 565 | AC_HELP_STRING([--enable-randr1.2], |
500 | [ --enable-randr1.2 RANDR 1.2 support ([default=yes])], | 566 | [RANDR 1.2 support [default=yes]]), , |
501 | if test x$enableval = "xyes"; then | 567 | [enableval=yes]) |
502 | AC_MSG_RESULT([yes]) | 568 | if test "x$enableval" = "xyes"; then |
503 | AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration, | ||
504 | AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support")) | ||
505 | else | ||
506 | AC_MSG_RESULT([no]) | ||
507 | fi, | ||
508 | AC_MSG_RESULT([yes]) | 569 | AC_MSG_RESULT([yes]) |
509 | AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration, | 570 | AC_CHECK_LIB(Xrandr, XRRQueryExtension, |
510 | AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support")) | 571 | AC_MSG_CHECKING([for X11/extensions/Xrandr.h]) |
511 | ) | 572 | AC_TRY_COMPILE( |
573 | #include <X11/Xlib.h> | ||
574 | #include <X11/Xutil.h> | ||
575 | #include <X11/extensions/Xrandr.h> | ||
576 | , XRRUpdateConfiguration(0), | ||
577 | AC_MSG_RESULT([yes]) | ||
578 | AC_DEFINE(HAVE_RANDR1_2, [1], [Define to 1 if you have RANDR 1.2]) | ||
579 | LIBS="$LIBS -lXrandr", | ||
580 | AC_MSG_RESULT([no]))) | ||
581 | else | ||
582 | AC_MSG_RESULT([no]) | ||
583 | CONFIGOPTS="$CONFIGOPTS --disable-randr1.2" | ||
584 | fi | ||
512 | 585 | ||
513 | dnl Check for Xinerama support | ||
514 | 586 | ||
515 | AC_MSG_CHECKING([whether to build support for the Xinerama extension]) | ||
516 | AC_ARG_ENABLE( | ||
517 | xinerama, | ||
518 | [ --enable-xinerama enable xinerama extension ([default=yes])], | ||
519 | if test x$enableval = "xyes"; then | ||
520 | AC_MSG_RESULT([yes]) | ||
521 | AC_CHECK_LIB(Xinerama, XineramaQueryScreens, | ||
522 | AC_DEFINE(XINERAMA, 1, "Xinerama support") | ||
523 | LIBS="$LIBS -lXinerama") | ||
524 | else | ||
525 | AC_MSG_RESULT([no]) | ||
526 | fi, | ||
527 | 587 | ||
528 | AC_MSG_RESULT([yes]) | 588 | # # |
529 | AC_CHECK_LIB(Xinerama, XineramaQueryScreens, | 589 | # AC_MSG_CHECKING([whether to have RANDR 1.2 support]) |
530 | AC_DEFINE(XINERAMA, 1, "Xinerama support") | 590 | # AC_ARG_ENABLE( |
531 | LIBS="$LIBS -lXinerama") | 591 | # randr1.2, |
532 | ) | 592 | # [ --enable-randr1.2 RANDR 1.2 support ([default=yes])], |
593 | # if test x$enableval = "xyes"; then | ||
594 | # AC_MSG_RESULT([yes]) | ||
595 | # AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration, | ||
596 | # AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support")) | ||
597 | # else | ||
598 | # AC_MSG_RESULT([no]) | ||
599 | # fi, | ||
600 | # AC_MSG_RESULT([yes]) | ||
601 | # AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration, | ||
602 | # AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support")) | ||
603 | # ) | ||
604 | |||
605 | |||
533 | 606 | ||
534 | AC_ARG_WITH( | 607 | AC_ARG_WITH( |
535 | menu, | 608 | menu, |
@@ -608,21 +681,6 @@ AC_TYPE_SIGNAL | |||
608 | dnl Determine if maintainer portions of the Makefiles should be included. | 681 | dnl Determine if maintainer portions of the Makefiles should be included. |
609 | dnl AM_MAINTAINER_MODE | 682 | dnl AM_MAINTAINER_MODE |
610 | 683 | ||
611 | dnl Print results | ||
612 | AC_MSG_RESULT([]) | ||
613 | AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.]) | ||
614 | AC_MSG_RESULT([]) | ||
615 | AC_MSG_RESULT([Using '$prefix' for installation.]) | ||
616 | AC_MSG_RESULT([Using '$DEFAULT_MENU' for location menu file.]) | ||
617 | AC_MSG_RESULT([Using '$DEFAULT_STYLE' by default style.]) | ||
618 | AC_MSG_RESULT([Using '$DEFAULT_KEYS' for location keys file.]) | ||
619 | AC_MSG_RESULT([Using '$DEFAULT_INIT' for location init file.]) | ||
620 | AC_MSG_RESULT([Using '$LOCALE_PATH' for nls files.]) | ||
621 | AC_MSG_RESULT([Using '$CXX' for C++ compiler.]) | ||
622 | AC_MSG_RESULT([Building with '$CXXFLAGS' for C++ compiler flags.]) | ||
623 | AC_MSG_RESULT([Building with '$LIBS' for linker flags.]) | ||
624 | AC_MSG_RESULT([]) | ||
625 | |||
626 | dnl Output files | 684 | dnl Output files |
627 | AM_CONFIG_HEADER(config.h) | 685 | AM_CONFIG_HEADER(config.h) |
628 | 686 | ||
@@ -693,66 +751,19 @@ nls/zh_CN/Makefile | |||
693 | nls/zh_TW/Makefile | 751 | nls/zh_TW/Makefile |
694 | ) | 752 | ) |
695 | 753 | ||
696 | dnl autoscan suggested these as of 2cac7ddf6fb0b3c937c4ea7b55b20960e362a360 | 754 | dnl Print results |
697 | dnl wanted by: src/ClockTool.cc:262 | 755 | AC_MSG_RESULT([]) |
698 | AC_CHECK_FUNCS([gettimeofday]) | 756 | AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.]) |
699 | dnl wanted by: src/Ewmh.cc:770 | 757 | AC_MSG_RESULT([]) |
700 | AC_CHECK_FUNCS([memset]) | 758 | AC_MSG_RESULT([Using '$prefix' for installation.]) |
701 | dnl wanted by: src/fluxbox.cc:553 | 759 | AC_MSG_RESULT([Using '$DEFAULT_MENU' for location menu file.]) |
702 | AC_CHECK_FUNCS([mkdir]) | 760 | AC_MSG_RESULT([Using '$DEFAULT_STYLE' by default style.]) |
703 | dnl wanted by: src/FbTk/FbString.cc:80 | 761 | AC_MSG_RESULT([Using '$DEFAULT_KEYS' for location keys file.]) |
704 | AC_CHECK_FUNCS([nl_langinfo]) | 762 | AC_MSG_RESULT([Using '$DEFAULT_INIT' for location init file.]) |
705 | dnl wanted by: src/FbCommands.cc:172 | 763 | AC_MSG_RESULT([Using '$LOCALE_PATH' for nls files.]) |
706 | AC_CHECK_FUNCS([putenv]) | 764 | AC_MSG_RESULT([Using '$CXX' for C++ compiler.]) |
707 | dnl wanted by: src/FbTk/RegExp.cc:56 | 765 | AC_MSG_RESULT([Building with '$CXXFLAGS' for C++ compiler flags.]) |
708 | AC_CHECK_FUNCS([regcomp]) | 766 | AC_MSG_RESULT([Building with '$LIBS' for linker flags.]) |
709 | dnl wanted by: src/FbTk/Timer.cc:156 | 767 | AC_MSG_RESULT([]) |
710 | AC_CHECK_FUNCS([select]) | 768 | AC_MSG_RESULT([Now build $PACKAGE with 'make']) |
711 | dnl wanted by: src/FbCommands.cc:206 | 769 | AC_MSG_RESULT([]) |
712 | AC_CHECK_FUNCS([setenv]) | ||
713 | dnl wanted by: src/WorkspaceCmd.cc:403 | ||
714 | AC_CHECK_FUNCS([sqrt]) | ||
715 | dnl wanted by: src/ClientPattern.cc:104 | ||
716 | AC_CHECK_FUNCS([strcasecmp]) | ||
717 | dnl wanted by: src/FbTk/XmbFontImp.cc:101 | ||
718 | AC_CHECK_FUNCS([strchr]) | ||
719 | dnl wanted by: src/RootTheme.cc:187 | ||
720 | AC_CHECK_FUNCS([strstr]) | ||
721 | dnl wanted by: src/Window.cc:4165 | ||
722 | AC_CHECK_FUNCS([strtol]) | ||
723 | dnl wanted by: src/Keys.cc:422 | ||
724 | AC_CHECK_FUNCS([strtoul]) | ||
725 | dnl wanted by: src/FbTk/FbString.cc:43 | ||
726 | AC_CHECK_HEADERS([langinfo.h]) | ||
727 | dnl wanted by: src/AlphaMenu.cc:51 | ||
728 | AC_C_CONST | ||
729 | dnl wanted by: src/Window.cc:3259 | ||
730 | AC_C_INLINE | ||
731 | dnl wanted by: src/FbTk/FileUtil.cc:117 | ||
732 | AC_FUNC_CLOSEDIR_VOID | ||
733 | dnl wanted by: src/ClientPattern.cc:333 | ||
734 | AC_FUNC_ERROR_AT_LINE | ||
735 | dnl wanted by: src/FbCommands.cc:144 | ||
736 | AC_FUNC_FORK | ||
737 | dnl wanted by: src/FbTk/FbString.cc:150 | ||
738 | AC_FUNC_MALLOC | ||
739 | dnl wanted by: src/FbTk/FbString.cc:181 | ||
740 | AC_FUNC_REALLOC | ||
741 | dnl wanted by: src/FbTk/Timer.cc:156 | ||
742 | AC_FUNC_SELECT_ARGTYPES | ||
743 | dnl wanted by: src/Slit.cc:1149 | ||
744 | AC_FUNC_STAT | ||
745 | dnl wanted by: src/ClockTool.cc:273 | ||
746 | AC_FUNC_STRFTIME | ||
747 | dnl wanted by: src/FbTk/FileUtil.hh:34 | ||
748 | AC_HEADER_DIRENT | ||
749 | dnl wanted by: src/AlphaMenu.hh:49 | ||
750 | AC_HEADER_STDBOOL | ||
751 | dnl wanted by: src/Keys.cc:75 | ||
752 | AC_HEADER_SYS_WAIT | ||
753 | dnl wanted by: src/AlphaMenu.cc:37 | ||
754 | AC_STRUCT_TM | ||
755 | dnl wanted by: src/FbCommands.cc:144 | ||
756 | AC_TYPE_PID_T | ||
757 | dnl wanted by: src/ClientMenu.cc:128 | ||
758 | AC_TYPE_SIZE_T | ||