comparison configure.ac @ 16330:306e0ac231d0

move AH_BOTTOM output to separate header file * oct-conf-post.in.h: New file with contents extracted from AH_BOTTOM configure macro. * configure.ac (AH_BOTTOM): Simply include oct-conf-post.h. (AC_CONFIG_HEADERS): Use config.in.h instead of config.h.in for consistency with other generated header files. (AC_CONFIG_FILES): Generate oct-conf-post.h from oct-conf-post.in.h. * Makefile.am (octinclude_HEADERS): New variable.
author John W. Eaton <jwe@octave.org>
date Sun, 17 Mar 2013 04:58:33 -0400
parents 7d0848353eaf
children 5293cee91891
comparison
equal deleted inserted replaced
16329:7d0848353eaf 16330:306e0ac231d0
35 35
36 dnl FIXME: We should auto-insert the Mercurial changeset ID into the 36 dnl FIXME: We should auto-insert the Mercurial changeset ID into the
37 dnl AC_REVISION field whenever configure.ac is modified. 37 dnl AC_REVISION field whenever configure.ac is modified.
38 dnl AC_REVISION($Revision: 1.603 $) 38 dnl AC_REVISION($Revision: 1.603 $)
39 AC_CONFIG_SRCDIR([libinterp/octave.cc]) 39 AC_CONFIG_SRCDIR([libinterp/octave.cc])
40 AC_CONFIG_HEADERS([config.h]) 40 AC_CONFIG_HEADERS([config.h:config.in.h])
41 AC_CONFIG_AUX_DIR([build-aux]) 41 AC_CONFIG_AUX_DIR([build-aux])
42 AC_CONFIG_MACRO_DIR([m4]) 42 AC_CONFIG_MACRO_DIR([m4])
43 43
44 AM_INIT_AUTOMAKE([1.11 tar-ustar]) 44 AM_INIT_AUTOMAKE([1.11 tar-ustar])
45 45
2660 2660
2661 export CC 2661 export CC
2662 export CXX 2662 export CXX
2663 export F77 2663 export F77
2664 2664
2665 ### Some things to add to the bottom of config.h. 2665 AH_BOTTOM([#include "oct-conf-post.h"])
2666
2667 dnl ------------------------------------------------------------
2668
2669 AH_BOTTOM([
2670 #if !defined (GNULIB_NAMESPACE)
2671 #define GNULIB_NAMESPACE gnulib
2672 #endif
2673
2674 #if defined (__GNUC__)
2675 #define GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__))
2676 #define HAVE_ATTR_DEPRECATED
2677
2678 #define GCC_ATTR_NORETURN __attribute__ ((__noreturn__))
2679 #define HAVE_ATTR_NORETURN
2680
2681 #define GCC_ATTR_UNUSED __attribute__ ((__unused__))
2682 #define HAVE_ATTR_UNUSED
2683 #else
2684 #define GCC_ATTR_DEPRECATED
2685 #define GCC_ATTR_NORETURN
2686 #define GCC_ATTR_UNUSED
2687 #endif
2688
2689 #define X_CAST(T, E) (T) (E)
2690
2691 #if defined (CXX_BROKEN_REINTERPRET_CAST)
2692 #define FCN_PTR_CAST(T, E) (T) (E)
2693 #else
2694 #define FCN_PTR_CAST(T, E) reinterpret_cast<T> (E)
2695 #endif
2696
2697 #if ! defined (HAVE_DEV_T)
2698 typedef short dev_t;
2699 #endif
2700
2701 #if ! defined (HAVE_INO_T)
2702 typedef unsigned long ino_t;
2703 #endif
2704
2705 #if defined (_MSC_VER)
2706 #define __WIN32__
2707 #define WIN32
2708 /* missing parameters in macros */
2709 #pragma warning (disable: 4003)
2710 /* missing implementations in template instantiation */
2711 #pragma warning (disable: 4996)
2712 /* deprecated function names (FIXME?) */
2713 #pragma warning (disable: 4661)
2714 #endif
2715
2716 #if defined (__WIN32__) && ! defined (__CYGWIN__)
2717 #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
2718 #elif defined (__CYGWIN__)
2719 #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
2720 #define OCTAVE_HAVE_POSIX_FILESYSTEM 1
2721 #else
2722 #define OCTAVE_HAVE_POSIX_FILESYSTEM 1
2723 #endif
2724
2725 /* Define to 1 if we expect to have <windows.h>, Sleep, etc. */
2726 #if defined (__WIN32__) && ! defined (__CYGWIN__)
2727 #define OCTAVE_USE_WINDOWS_API 1
2728 #endif
2729
2730 #if defined (__APPLE__) && defined (__MACH__)
2731 #define OCTAVE_USE_OS_X_API 1
2732 #endif
2733
2734 /* sigsetjmp is a macro, not a function. */
2735 #if defined (sigsetjmp) && defined (HAVE_SIGLONGJMP)
2736 #define OCTAVE_HAVE_SIG_JUMP
2737 #endif
2738
2739 #if defined (_UNICOS)
2740 #define F77_USES_CRAY_CALLING_CONVENTION
2741 #endif
2742
2743 #if 0
2744 #define F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION
2745 #endif
2746
2747 #ifdef USE_64_BIT_IDX_T
2748 #define SIZEOF_OCTAVE_IDX_TYPE SIZEOF_INT64_T
2749 #else
2750 #define SIZEOF_OCTAVE_IDX_TYPE SIZEOF_INT
2751 #endif
2752
2753 /* To be able to use long doubles for 64-bit mixed arithmetics, we need
2754 them at least 80 bits wide and we need roundl declared in math.h.
2755 FIXME: Maybe substitute this by a more precise check in the future? */
2756 #if (SIZEOF_LONG_DOUBLE >= 10) && defined (HAVE_ROUNDL)
2757 #define OCTAVE_INT_USE_LONG_DOUBLE
2758 #endif
2759
2760 #define OCTAVE_EMPTY_CPP_ARG
2761
2762 /* Octave is currently unable to use FFTW unless both float
2763 and double versions are available. */
2764 #if defined (HAVE_FFTW3) && defined (HAVE_FFTW3F)
2765 #define HAVE_FFTW
2766 #endif
2767
2768 /* Backward compatibility. */
2769 #if defined (HAVE_Z)
2770 #define HAVE_ZLIB
2771 #endif
2772
2773 /* oct-dlldefs.h */
2774
2775 #if defined (_MSC_VER)
2776 #define OCTAVE_EXPORT __declspec(dllexport)
2777 #define OCTAVE_IMPORT __declspec(dllimport)
2778 #else
2779 /* All other compilers, at least for now. */
2780 #define OCTAVE_EXPORT
2781 #define OCTAVE_IMPORT
2782 #endif
2783
2784 /* API macro for libcruft */
2785 #ifdef CRUFT_DLL
2786 #define CRUFT_API OCTAVE_EXPORT
2787 #else
2788 #define CRUFT_API OCTAVE_IMPORT
2789 #endif
2790
2791 /* API macro for liboctave */
2792 #ifdef OCTAVE_DLL
2793 #define OCTAVE_API OCTAVE_EXPORT
2794 #else
2795 #define OCTAVE_API OCTAVE_IMPORT
2796 #endif
2797
2798 /* API macro for libinterp */
2799 #ifdef OCTINTERP_DLL
2800 #define OCTINTERP_API OCTAVE_EXPORT
2801 #else
2802 #define OCTINTERP_API OCTAVE_IMPORT
2803 #endif
2804
2805 /* API macro for libinterp/graphics */
2806 #ifdef OCTGRAPHICS_DLL
2807 #define OCTGRAPHICS_API OCTAVE_EXPORT
2808 #else
2809 #define OCTGRAPHICS_API OCTAVE_IMPORT
2810 #endif
2811
2812 /* API macro for libgui */
2813 #ifdef OCTGUI_DLL
2814 #define OCTGUI_API OCTAVE_EXPORT
2815 #else
2816 #define OCTGUI_API OCTAVE_IMPORT
2817 #endif
2818
2819 /* oct-types.h */
2820
2821 #include <stdint.h>
2822
2823 typedef OCTAVE_IDX_TYPE octave_idx_type;
2824
2825 /* Tag indicating Octave config.h has been included */
2826 #define OCTAVE_CONFIG_INCLUDED 1
2827 ])
2828
2829 dnl end of AH_BOTTOM
2830 dnl ------------------------------------------------------------
2831 2666
2832 ### Make all AC_DEFINES available to testif feature of test.m function. 2667 ### Make all AC_DEFINES available to testif feature of test.m function.
2833 ### This must reside at the bottom of configure.ac after all AC_DEFINES 2668 ### This must reside at the bottom of configure.ac after all AC_DEFINES
2834 ### have been made. 2669 ### have been made.
2835 2670
2839 2674
2840 AC_SUBST(ac_config_files) 2675 AC_SUBST(ac_config_files)
2841 AC_SUBST(ac_config_headers) 2676 AC_SUBST(ac_config_headers)
2842 2677
2843 AC_CONFIG_FILES([ 2678 AC_CONFIG_FILES([
2679 oct-conf-post.h:oct-conf-post.in.h
2844 Makefile 2680 Makefile
2845 doc/Makefile 2681 doc/Makefile
2846 doc/doxyhtml/Makefile 2682 doc/doxyhtml/Makefile
2847 doc/icons/Makefile 2683 doc/icons/Makefile
2848 doc/interpreter/Makefile 2684 doc/interpreter/Makefile