comparison configure.in @ 434:9d177e8d4150 r21-2-25

Import from CVS: tag r21-2-25
author cvs
date Mon, 13 Aug 2007 11:30:53 +0200
parents 3a7e78e1142d
children 84b14dcb0985
comparison
equal deleted inserted replaced
433:892ca416f0fb 434:9d177e8d4150
636 fi 636 fi
637 sound_notfirst=true 637 sound_notfirst=true
638 done 638 done
639 ;; 639 ;;
640 640
641 dnl Has the user specified a prefered Athena widget set?
642 dnl This bit expands any alias names out for us...
643 "with_athena" )
644 case "$val" in
645 xa | xaw ) val=xaw ;;
646 3 | 3d | xaw3d ) val=3d ;;
647 dnl No `n' for next, someone may try `no'
648 ne | nex | next | naxtaw) val=next ;;
649 dnl Have not tested the next two...
650 9 | 95 | xaw95 ) val=95 ;;
651 xp | xpm | xawxpm ) val=xpm ;;
652 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
653 \`xaw', \`3d', \`next', \`95', or \`xpm'."]) ;;
654 esac
655 eval "$opt=\"$val\""
656 ;;
657
641 dnl Has the user requested XIM support? 658 dnl Has the user requested XIM support?
642 "with_xim" ) 659 "with_xim" )
643 case "$val" in 660 case "$val" in
644 y | ye | yes ) val=yes ;; 661 y | ye | yes ) val=yes ;;
645 n | no | non | none ) val=no ;; 662 n | no | non | none ) val=no ;;
770 "with_dialogs" | \ 787 "with_dialogs" | \
771 "with_widgets" ) 788 "with_widgets" )
772 case "$val" in 789 case "$val" in
773 l | lu | luc | luci | lucid ) val=lucid ;; 790 l | lu | luc | luci | lucid ) val=lucid ;;
774 m | mo | mot | moti | motif ) val=motif ;; 791 m | mo | mot | moti | motif ) val=motif ;;
775 athena3d | athena-3d ) val=athena3d ;;
776 a | at | ath | athe | athen | athena ) val=athena ;; 792 a | at | ath | athe | athen | athena ) val=athena ;;
777 n | no | non | none ) val=no ;; 793 n | no | non | none ) val=no ;;
778 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: 794 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
779 \`lucid', \`motif', \`athena', \`athena3d', or \`no'."]) ;; 795 \`lucid', \`motif', \`athena', or \`no'."]) ;;
780 esac 796 esac
781 eval "$opt=\"$val\"" 797 eval "$opt=\"$val\""
782 ;; 798 ;;
783 799
784 dnl Obsolete legacy argument? Warn, but otherwise ignore. 800 dnl Obsolete legacy argument? Warn, but otherwise ignore.
2566 dnl It ought to be reasonable to have no output device at all, and only use 2582 dnl It ought to be reasonable to have no output device at all, and only use
2567 dnl XEmacs in --batch mode. 2583 dnl XEmacs in --batch mode.
2568 dnl if test "$with_tty" = "no" ; then 2584 dnl if test "$with_tty" = "no" ; then
2569 dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.]) 2585 dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.])
2570 dnl fi 2586 dnl fi
2571 for feature in tooltalk cde offix wmcommand xim xmu xpm nas_sound 2587 for feature in tooltalk cde offix wmcommand xim xmu nas_sound
2572 do 2588 do
2573 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then 2589 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
2574 AC_MSG_WARN([--with-$feature ignored: Not valid without X support]) 2590 AC_MSG_WARN([--with-$feature ignored: Not valid without X support])
2575 fi 2591 fi
2576 eval "with_${feature}=no" 2592 eval "with_${feature}=no"
2877 2893
2878 if test "$with_x11" = "yes"; then 2894 if test "$with_x11" = "yes"; then
2879 2895
2880 AC_CHECKING(for X11 graphics libraries) 2896 AC_CHECKING(for X11 graphics libraries)
2881 2897
2882 dnl Autodetect -lXaw 2898 AC_CHECKING(for the Athena widgets)
2883 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) 2899
2884 dnl if test "$have_xaw" = "yes"; then 2900 dnl What in heck did the user actually want?
2885 dnl AC_CHECK_HEADER(X11/Xaw/Reports.h, [ 2901 case "$with_athena" in
2886 dnl XE_APPEND(pkg-src/tree-x, MAKE_SUBDIR) 2902 dnl This is the default, old fashioned flat Athena.
2887 dnl XE_APPEND(pkg-src/tree-x, INSTALL_ARCH_DEP_SUBDIR)]) 2903 "xaw" | "") athena_variant=Xaw athena_3d=no ;;
2888 dnl fi 2904 "3d") athena_variant=Xaw3d athena_3d=yes ;;
2889 2905 "next") athena_variant=neXtaw athena_3d=yes ;;
2890 dnl Autodetect -lXaw3d 2906 "95") athena_variant=Xaw95 athena_3d=yes ;;
2891 AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, have_xaw3d=yes, have_xaw3d=no) 2907 "xpm") athena_variant=XawXpm athena_3d=yes ;;
2908 *) XE_DIE("Unknown Athena widget set \`$with_athena'. This should not happen.") ;;
2909 esac
2910
2911 dnl Search for the Athena library...
2912 if test "$athena_3d" = "no"; then
2913 AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
2914 [
2915 dnl Must not be a 3d library...
2916 AC_CHECK_LIB($athena_variant, threeDClassRec,
2917 AC_MSG_WARN("Could not find a non-3d Athena widget library."),
2918 athena_lib=$athena_variant)
2919 ],
2920 AC_MSG_WARN("Could not find an Athena widget library."))
2921 else
2922 dnl The real configuration, need 3d library
2923 AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant,
2924 dnl OK, couldn't find it with a proper name, try the standard Athena lib
2925 dnl If that is 3d, presume the user asked for what they have installed.
2926 AC_CHECK_LIB(Xaw, threeDClassRec,
2927 [
2928 athena_lib=Xaw;
2929 AC_MSG_WARN("Assuming that libXaw is actually $athena_variant.");
2930 ],
2931 AC_MSG_WARN("Could not find a 3d Athena widget library that looked like $athena_variant.")))
2932 fi
2933
2934 dnl Now we locate the Athena headers that we need.
2935 if test "$athena_3d" = "no"; then
2936 AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
2937 AC_MSG_WARN("Could not find a non-3d Athena header set."),
2938 AC_CHECK_HEADER(X11/Xaw/XawInit.h,
2939 athena_h_path=X11/Xaw,
2940 AC_MSG_WARN("Could not find a non-3d Athena header set.")))
2941 else
2942 dnl The three-d Athena headers are so much more slippery.
2943 dnl Curse this `Lets replace standard libraries' thing that they did. :/
2944 AC_CHECK_HEADER(X11/$athena_variant/XawInit.h,
2945 AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
2946 athena_h_path=X11/$athena_variant,))
2947
2948 dnl If we couldn't find the specific variant, try the generic Athena 3d headers
2949 if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
2950 AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
2951 AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h,
2952 [
2953 AC_MSG_WARN("Assuming that X11/Xaw3d headers are suitable for $athena_variant.")
2954 athena_h_path=X11/Xaw3d
2955 ],))
2956 fi
2957
2958 dnl If nothing yet found, see if Xaw is a 3d header set...
2959 dnl We AC_MSG_WARN if we fail because I am all out of ideas...
2960 if test -z "$athena_h_path"; then
2961 AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
2962 [
2963 AC_MSG_WARN("Assuming that X11/Xaw headers are suitable for $athena_variant.")
2964 athena_h_path=X11/Xaw
2965 ],
2966 AC_MSG_WARN("Could not find a suitable 3d Athena header set."))
2967 fi
2968 fi
2969
2970 dnl Do we actually have a usable Athena widget set? Please?
2971 if test -n "$athena_lib" -a -n "$athena_h_path"; then
2972 have_xaw=yes
2973 else
2974 have_xaw=no
2975 fi
2892 2976
2893 dnl autodetect Motif - but only add to libs_x later (if necessary) 2977 dnl autodetect Motif - but only add to libs_x later (if necessary)
2894 AC_CHECK_HEADER(Xm/Xm.h, 2978 AC_CHECK_HEADER(Xm/Xm.h,
2895 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)], 2979 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)],
2896 have_motif=no) 2980 have_motif=no)
2911 2995
2912 dnl Finish ensuring that we have values for the various toolkit items. 2996 dnl Finish ensuring that we have values for the various toolkit items.
2913 dnl Not all toolkits support all widgets 2997 dnl Not all toolkits support all widgets
2914 dnl if Motif is available we use it for the dialog boxes. 2998 dnl if Motif is available we use it for the dialog boxes.
2915 2999
2916 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) 3000 case "$with_menubars" in "" | "yes" | "athena" )
2917 with_menubars="lucid" ;; 3001 with_menubars="lucid" ;;
2918 esac 3002 esac
2919 case "$with_dialogs" in "" | "yes" | "lucid" ) 3003 case "$with_dialogs" in "" | "yes" | "lucid" )
2920 if test "$have_motif" = "yes"; then with_dialogs="motif" 3004 if test "$have_motif" = "yes"; then with_dialogs="motif"
2921 elif test "$have_xaw3d" = "yes"; then with_dialogs="athena3d" 3005 elif test "$have_xaw" = "yes"; then with_dialogs="athena"
2922 elif test "$have_xaw" = "yes"; then with_dialogs="athena"
2923 else with_dialogs=no 3006 else with_dialogs=no
2924 fi ;; 3007 fi ;;
2925 esac 3008 esac
2926 case "$with_scrollbars" in "" | "yes" ) 3009 case "$with_scrollbars" in "" | "yes" )
2927 with_scrollbars="lucid" ;; 3010 with_scrollbars="lucid" ;;
2928 esac 3011 esac
2929 case "$with_widgets" in "" | "yes" | "lucid") 3012 case "$with_widgets" in "" | "yes" | "lucid")
2930 if test "$have_motif" = "yes"; then with_widgets="motif" 3013 if test "$have_motif" = "yes"; then with_widgets="motif"
2931 elif test "$have_xaw3d" = "yes"; then with_widgets="athena3d"
2932 elif test "$have_xaw" = "yes"; then with_widgets="athena" 3014 elif test "$have_xaw" = "yes"; then with_widgets="athena"
2933 else with_widgets=no 3015 else with_widgets=no
2934 fi ;; 3016 fi ;;
2935 esac 3017 esac
2936 3018
2937 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets" 3019 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
2938 3020
2939 case "$all_widgets" in 3021 case "$all_widgets" in
2940 *athena*3d ) 3022 *athena* )
2941 AC_DEFINE(LWLIB_USES_ATHENA) 3023 if test "$have_xaw" != "yes"; then
2942 AC_DEFINE(NEED_ATHENA) 3024 XE_DIE("Could not find a suitable Athena library to build with.")
2943 XE_APPEND(lwlib-Xaw.o, lwlib_objs) 3025 fi
2944 if test "$have_xaw3d"; then 3026
2945 XE_PREPEND(-lXaw3d, libs_x) 3027 dnl Add the Lucid widget Athena code
2946 else 3028 XE_APPEND(lwlib-Xaw.o, lwlib_objs)
2947 XE_PREPEND(-lXaw, libs_x) 3029
2948 fi ;; 3030 dnl Add the Athena widget library we located earlier
2949 *athena* ) 3031 XE_PREPEND(-l$athena_lib, libs_x)
2950 AC_DEFINE(LWLIB_USES_ATHENA) 3032
2951 AC_DEFINE(NEED_ATHENA) 3033 dnl Export the path for lwlib, used to build and include the headers
2952 XE_APPEND(lwlib-Xaw.o, lwlib_objs) 3034 dnl from the right place later on.
2953 XE_PREPEND(-lXaw, libs_x) ;; 3035 AC_DEFINE_UNQUOTED(ATHENA_H_PATH, $athena_h_path)
3036
3037 AC_DEFINE(LWLIB_USES_ATHENA)
3038 AC_DEFINE(NEED_ATHENA)
3039
3040 if test "$athena_3d" = "yes"; then
3041 AC_DEFINE(HAVE_ATHENA_3D)
3042 fi
3043 ;;
2954 esac 3044 esac
2955 3045
2956 case "$all_widgets" in *motif* ) 3046 case "$all_widgets" in *motif* )
2957 AC_DEFINE(LWLIB_USES_MOTIF) 3047 AC_DEFINE(LWLIB_USES_MOTIF)
2958 AC_DEFINE(NEED_MOTIF) 3048 AC_DEFINE(NEED_MOTIF)
2973 XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;; 3063 XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;;
2974 esac 3064 esac
2975 3065
2976 AC_SUBST(lwlib_objs) 3066 AC_SUBST(lwlib_objs)
2977 3067
2978 case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac 3068 test "$with_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA)
2979 case "$with_dialogs" in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA) ;; esac 3069 test "$with_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA)
2980 test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) 3070
2981 test "$with_dialogs" = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) 3071 if test "$athena_3d" = "yes"; then
3072 test "$with_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D)
3073 test "$with_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D)
3074 fi
3075
2982 case "$with_widgets" in athena* ) AC_DEFINE(LWLIB_WIDGETS_ATHENA);; esac 3076 case "$with_widgets" in athena* ) AC_DEFINE(LWLIB_WIDGETS_ATHENA);; esac
2983 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \ 3077 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
2984 AC_DEFINE(LWLIB_TABS_LUCID) 3078 AC_DEFINE(LWLIB_TABS_LUCID)
2985 3079
2986 test "$with_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS) 3080 test "$with_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS)