Mercurial > hg > octave-nkf
comparison configure.ac @ 15857:715d324b1b72
configure.ac: Move tests for programs necessary to build Octave close to top of file.
This follows Autoconf guidelines.
* configure.ac: Move tests for programs necessary to build Octave close to top
of file.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 27 Dec 2012 19:58:09 -0800 |
parents | 37371278f9fc |
children | b316429bfa89 |
comparison
equal
deleted
inserted
replaced
15856:37371278f9fc | 15857:715d324b1b72 |
---|---|
46 OCTAVE_HOST_TYPE | 46 OCTAVE_HOST_TYPE |
47 | 47 |
48 AC_DEFINE(OCTAVE_SOURCE, 1, [Define to 1 if this is Octave.]) | 48 AC_DEFINE(OCTAVE_SOURCE, 1, [Define to 1 if this is Octave.]) |
49 | 49 |
50 AC_USE_SYSTEM_EXTENSIONS | 50 AC_USE_SYSTEM_EXTENSIONS |
51 | |
52 ### Make configure args available for other uses. | |
53 | |
54 config_opts=$ac_configure_args | |
55 AC_SUBST(config_opts) | |
56 | |
57 ### Set default file locations | |
58 | |
59 OCTAVE_SET_DEFAULT([octlibdir], '$(libdir)/octave/$(version)') | |
60 OCTAVE_SET_DEFAULT([archlibdir], | |
61 '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)') | |
62 OCTAVE_SET_DEFAULT([localarchlibdir], | |
63 '$(libexecdir)/octave/site/exec/$(canonical_host_type)') | |
64 OCTAVE_SET_DEFAULT([localapiarchlibdir], | |
65 '$(libexecdir)/octave/$(api_version)/site/exec/$(canonical_host_type)') | |
66 OCTAVE_SET_DEFAULT([localverarchlibdir], | |
67 '$(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)') | |
68 OCTAVE_SET_DEFAULT([octfiledir], | |
69 '$(libdir)/octave/$(version)/oct/$(canonical_host_type)') | |
70 OCTAVE_SET_DEFAULT([localoctfiledir], | |
71 '$(libdir)/octave/site/oct/$(canonical_host_type)') | |
72 OCTAVE_SET_DEFAULT([localapioctfiledir], | |
73 '$(libdir)/octave/site/oct/$(api_version)/$(canonical_host_type)') | |
74 OCTAVE_SET_DEFAULT([localveroctfiledir], | |
75 '$(libdir)/octave/$(version)/site/oct/$(canonical_host_type)') | |
76 OCTAVE_SET_DEFAULT([octincludedir], '$(includedir)/octave-$(version)/octave') | |
77 OCTAVE_SET_DEFAULT([fcnfiledir], '$(datadir)/octave/$(version)/m') | |
78 OCTAVE_SET_DEFAULT([localfcnfiledir], '$(datadir)/octave/site/m') | |
79 OCTAVE_SET_DEFAULT([localapifcnfiledir], | |
80 '$(datadir)/octave/site/$(api_version)/m') | |
81 OCTAVE_SET_DEFAULT([localverfcnfiledir], '$(datadir)/octave/$(version)/site/m') | |
82 OCTAVE_SET_DEFAULT([octetcdir], '$(datadir)/octave/$(version)/etc') | |
83 OCTAVE_SET_DEFAULT([doc_cache_file], '$(octetcdir)/doc-cache') | |
84 OCTAVE_SET_DEFAULT([texi_macros_file], '$(octetcdir)/macros.texi') | |
85 OCTAVE_SET_DEFAULT([imagedir], '$(datadir)/octave/$(version)/imagelib') | |
86 OCTAVE_SET_DEFAULT([man1dir], '$(mandir)/man1') | |
87 OCTAVE_SET_DEFAULT([man1ext], '.1') | |
88 OCTAVE_SET_DEFAULT([infofile], '$(infodir)/octave.info') | |
89 | |
90 ### Check for programs used in building, installing, and running Octave. | |
91 | |
92 ## Programs used in configuring Octave. | |
93 ## Find pkg-config executable (sets $PKG_CONFIG) | |
94 PKG_PROG_PKG_CONFIG | |
95 | |
96 ## Programs used in Makefiles. | |
97 AC_PROG_AWK | |
98 OCTAVE_PROG_FIND | |
99 OCTAVE_PROG_SED | |
100 OCTAVE_PROG_PERL | |
101 | |
102 ## Programs used to build parts of Octave. | |
103 OCTAVE_PROG_GPERF | |
104 | |
105 OCTAVE_PROG_FLEX | |
106 AC_SUBST([LEX_OUTPUT_ROOT], [lex.octave_]) | |
107 | |
108 OCTAVE_PROG_BISON | |
109 | |
110 OCTAVE_PROG_MAKEINFO | |
111 OCTAVE_PROG_TEXI2DVI | |
112 OCTAVE_PROG_TEXI2PDF | |
113 | |
114 ## Programs used when installing Octave. | |
115 AC_PROG_LN_S | |
116 AC_PROG_MKDIR_P | |
117 | |
118 AC_PROG_INSTALL | |
119 INSTALL_SCRIPT='${INSTALL}' | |
120 AC_SUBST(INSTALL_SCRIPT) | |
121 | |
122 OCTAVE_PROG_DESKTOP_FILE_INSTALL | |
123 | |
124 ## Programs used when running Octave | |
125 OCTAVE_PROG_GHOSTSCRIPT | |
126 OCTAVE_PROG_GNUPLOT | |
127 OCTAVE_PROG_PAGER | |
128 OCTAVE_PROG_PYTHON | |
51 | 129 |
52 ### Path separator. | 130 ### Path separator. |
53 | 131 |
54 sepchar=':' | 132 sepchar=':' |
55 AC_ARG_WITH([sepchar], | 133 AC_ARG_WITH([sepchar], |
72 AC_SUBST(sepchar) | 150 AC_SUBST(sepchar) |
73 AC_DEFINE_UNQUOTED(SEPCHAR, ['$sepchar'], | 151 AC_DEFINE_UNQUOTED(SEPCHAR, ['$sepchar'], |
74 [Define this to be the path separator for your system, as a character constant.]) | 152 [Define this to be the path separator for your system, as a character constant.]) |
75 AC_DEFINE_UNQUOTED(SEPCHAR_STR, ["$sepchar"], | 153 AC_DEFINE_UNQUOTED(SEPCHAR_STR, ["$sepchar"], |
76 [Define this to be the path separator for your system, as a string.]) | 154 [Define this to be the path separator for your system, as a string.]) |
77 | |
78 ### Set default file locations | |
79 | |
80 OCTAVE_SET_DEFAULT([man1dir], '$(mandir)/man1') | |
81 OCTAVE_SET_DEFAULT([man1ext], '.1') | |
82 OCTAVE_SET_DEFAULT([doc_cache_file], '$(octetcdir)/doc-cache') | |
83 OCTAVE_SET_DEFAULT([texi_macros_file], '$(octetcdir)/macros.texi') | |
84 OCTAVE_SET_DEFAULT([infofile], '$(infodir)/octave.info') | |
85 OCTAVE_SET_DEFAULT([octincludedir], '$(includedir)/octave-$(version)/octave') | |
86 OCTAVE_SET_DEFAULT([fcnfiledir], '$(datadir)/octave/$(version)/m') | |
87 OCTAVE_SET_DEFAULT([localfcnfiledir], '$(datadir)/octave/site/m') | |
88 OCTAVE_SET_DEFAULT([localapifcnfiledir], | |
89 '$(datadir)/octave/site/$(api_version)/m') | |
90 OCTAVE_SET_DEFAULT([localverfcnfiledir], '$(datadir)/octave/$(version)/site/m') | |
91 OCTAVE_SET_DEFAULT([octetcdir], '$(datadir)/octave/$(version)/etc') | |
92 OCTAVE_SET_DEFAULT([octlibdir], '$(libdir)/octave/$(version)') | |
93 OCTAVE_SET_DEFAULT([archlibdir], | |
94 '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)') | |
95 OCTAVE_SET_DEFAULT([localarchlibdir], | |
96 '$(libexecdir)/octave/site/exec/$(canonical_host_type)') | |
97 OCTAVE_SET_DEFAULT([localapiarchlibdir], | |
98 '$(libexecdir)/octave/$(api_version)/site/exec/$(canonical_host_type)') | |
99 OCTAVE_SET_DEFAULT([localverarchlibdir], | |
100 '$(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)') | |
101 OCTAVE_SET_DEFAULT([octfiledir], | |
102 '$(libdir)/octave/$(version)/oct/$(canonical_host_type)') | |
103 OCTAVE_SET_DEFAULT([localoctfiledir], | |
104 '$(libdir)/octave/site/oct/$(canonical_host_type)') | |
105 OCTAVE_SET_DEFAULT([localapioctfiledir], | |
106 '$(libdir)/octave/site/oct/$(api_version)/$(canonical_host_type)') | |
107 OCTAVE_SET_DEFAULT([localveroctfiledir], | |
108 '$(libdir)/octave/$(version)/site/oct/$(canonical_host_type)') | |
109 OCTAVE_SET_DEFAULT([imagedir], '$(datadir)/octave/$(version)/imagelib') | |
110 | |
111 ### Find pkg-config executable (sets $PKG_CONFIG) | |
112 | |
113 PKG_PROG_PKG_CONFIG | |
114 | |
115 ### Make configure args available for other uses. | |
116 | |
117 config_opts=$ac_configure_args | |
118 AC_SUBST(config_opts) | |
119 | 155 |
120 ### Define the path to the shell on the host system. Most systems will | 156 ### Define the path to the shell on the host system. Most systems will |
121 ### ensure /bin/sh is the default shell so this can be safely ignored by | 157 ### ensure /bin/sh is the default shell so this can be safely ignored by |
122 ### almost everyone. However, when building for Android, for example, | 158 ### almost everyone. However, when building for Android, for example, |
123 ### this will need to be set. | 159 ### this will need to be set. |
2113 /* NetBSD declares sys_siglist in unistd.h. */ | 2149 /* NetBSD declares sys_siglist in unistd.h. */ |
2114 #if HAVE_UNISTD_H | 2150 #if HAVE_UNISTD_H |
2115 # include <unistd.h> | 2151 # include <unistd.h> |
2116 #endif | 2152 #endif |
2117 ]]) | 2153 ]]) |
2118 | |
2119 ### Checks for other programs used in building, testing, installing, and | |
2120 ### running Octave. | |
2121 | |
2122 AC_PROG_AWK | |
2123 OCTAVE_PROG_FIND | |
2124 OCTAVE_PROG_SED | |
2125 OCTAVE_PROG_PERL | |
2126 OCTAVE_PROG_PYTHON | |
2127 | |
2128 OCTAVE_PROG_FLEX | |
2129 AC_SUBST([LEX_OUTPUT_ROOT], [lex.octave_]) | |
2130 | |
2131 OCTAVE_PROG_BISON | |
2132 | |
2133 AC_PROG_LN_S | |
2134 AC_PROG_MKDIR_P | |
2135 | |
2136 AC_PROG_INSTALL | |
2137 INSTALL_SCRIPT='${INSTALL}' | |
2138 AC_SUBST(INSTALL_SCRIPT) | |
2139 | |
2140 OCTAVE_PROG_DESKTOP_FILE_INSTALL | |
2141 | |
2142 OCTAVE_PROG_GNUPLOT | |
2143 OCTAVE_PROG_PAGER | |
2144 OCTAVE_PROG_GPERF | |
2145 | |
2146 OCTAVE_PROG_GHOSTSCRIPT | |
2147 OCTAVE_PROG_MAKEINFO | |
2148 OCTAVE_PROG_TEXI2DVI | |
2149 OCTAVE_PROG_TEXI2PDF | |
2150 | 2154 |
2151 ### Need to disable building documentation if gnuplot was not found, | 2155 ### Need to disable building documentation if gnuplot was not found, |
2152 ### unless it was already disabled previously. | 2156 ### unless it was already disabled previously. |
2153 | 2157 |
2154 if test -n "$DOCDIR" && test -n "$warn_gnuplot"; then | 2158 if test -n "$DOCDIR" && test -n "$warn_gnuplot"; then |