diff options
author | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-10-10 22:30:33 +0000 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-10-10 22:30:33 +0000 |
commit | a57dc1886a3785479be5040d399cd5cf44a015b3 (patch) | |
tree | afd1bce3279a241ff0385c7d5201abf0375b4b43 /configure.ac | |
parent | 4285653cfb574443344d5ac913e729b78c4d7293 (diff) |
efl: move all system-level checks to a single place at the top.
SVN revision: 77836
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 80 |
1 files changed, 49 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac index 8845c58b53..e7e3cb2ae3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -223,6 +223,55 @@ case "$build_profile" in | |||
223 | ;; | 223 | ;; |
224 | esac | 224 | esac |
225 | 225 | ||
226 | # Common Checks (keep names sorted for ease of use): | ||
227 | AC_HEADER_DIRENT | ||
228 | AC_HEADER_TIME | ||
229 | |||
230 | AC_CHECK_HEADERS([ \ | ||
231 | execinfo.h \ | ||
232 | inttypes.h \ | ||
233 | libgen.h \ | ||
234 | mcheck.h \ | ||
235 | netinet/in.h \ | ||
236 | siginfo.h \ | ||
237 | stdint.h \ | ||
238 | strings.h \ | ||
239 | sys/types.h \ | ||
240 | unistd.h \ | ||
241 | ]) | ||
242 | |||
243 | AC_CHECK_FUNCS([\ | ||
244 | backtrace \ | ||
245 | backtrace_symbols \ | ||
246 | execvp \ | ||
247 | fpathconf \ | ||
248 | fstatat \ | ||
249 | malloc_usable_size \ | ||
250 | mtrace \ | ||
251 | openat \ | ||
252 | strlcpy \ | ||
253 | ]) | ||
254 | |||
255 | # wchar_t | ||
256 | AC_CHECK_SIZEOF([wchar_t]) | ||
257 | EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t | ||
258 | AC_SUBST([EINA_SIZEOF_WCHAR_T]) | ||
259 | AC_CHECK_TYPES([siginfo_t], [], [], | ||
260 | [[ | ||
261 | #include <signal.h> | ||
262 | #if HAVE_SIGINFO_H | ||
263 | # include <siginfo.h> | ||
264 | #endif | ||
265 | ]]) | ||
266 | |||
267 | # struct dirent | ||
268 | |||
269 | AC_CHECK_TYPES([struct dirent], [have_dirent="yes"], [have_dirent="no"], | ||
270 | [[ | ||
271 | #include <dirent.h> | ||
272 | ]]) | ||
273 | |||
274 | |||
226 | 275 | ||
227 | #### Evil | 276 | #### Evil |
228 | 277 | ||
@@ -420,11 +469,6 @@ fi | |||
420 | 469 | ||
421 | ### Checks for header files | 470 | ### Checks for header files |
422 | 471 | ||
423 | AC_HEADER_TIME | ||
424 | AC_HEADER_DIRENT | ||
425 | |||
426 | AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h strings.h execinfo.h mcheck.h]) | ||
427 | |||
428 | # sys/mman.h could be provided by evil/escape/exotic so we need to set CFLAGS accordingly | 472 | # sys/mman.h could be provided by evil/escape/exotic so we need to set CFLAGS accordingly |
429 | CFLAGS_save="${CFLAGS}" | 473 | CFLAGS_save="${CFLAGS}" |
430 | CFLAGS="${CFLAGS} ${EINA_CFLAGS}" | 474 | CFLAGS="${CFLAGS} ${EINA_CFLAGS}" |
@@ -435,27 +479,6 @@ EINA_CONFIG(HAVE_INTTYPES_H, test "x${ac_cv_header_inttypes_h}" = "xyes") | |||
435 | EINA_CONFIG(HAVE_STDINT_H, test "x${ac_cv_header_stdint_h}" = "xyes") | 479 | EINA_CONFIG(HAVE_STDINT_H, test "x${ac_cv_header_stdint_h}" = "xyes") |
436 | 480 | ||
437 | ### Checks for types | 481 | ### Checks for types |
438 | |||
439 | # wchar_t | ||
440 | |||
441 | AC_CHECK_SIZEOF([wchar_t]) | ||
442 | EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t | ||
443 | AC_SUBST([EINA_SIZEOF_WCHAR_T]) | ||
444 | AC_CHECK_TYPES([siginfo_t], [], [], | ||
445 | [[ | ||
446 | #include <signal.h> | ||
447 | #if HAVE_SIGINFO_H | ||
448 | # include <siginfo.h> | ||
449 | #endif | ||
450 | ]]) | ||
451 | |||
452 | # struct dirent | ||
453 | |||
454 | AC_CHECK_TYPES([struct dirent], [have_dirent="yes"], [have_dirent="no"], | ||
455 | [[ | ||
456 | #include <dirent.h> | ||
457 | ]]) | ||
458 | |||
459 | EINA_CONFIG(HAVE_DIRENT_H, test "x${have_dirent}" = "xyes") | 482 | EINA_CONFIG(HAVE_DIRENT_H, test "x${have_dirent}" = "xyes") |
460 | AC_DEFINE_IF([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"], | 483 | AC_DEFINE_IF([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"], |
461 | [1], [Define to 1 if you have a valid <dirent.h> header file.]) | 484 | [1], [Define to 1 if you have a valid <dirent.h> header file.]) |
@@ -476,9 +499,6 @@ EFL_CHECK_COMPILER_FLAGS([EINA], [-Wshadow -Wpointer-arith]) | |||
476 | EFL_CHECK_LINKER_FLAGS([EINA], [-fno-strict-aliasing]) | 499 | EFL_CHECK_LINKER_FLAGS([EINA], [-fno-strict-aliasing]) |
477 | 500 | ||
478 | ### Checks for library functions | 501 | ### Checks for library functions |
479 | |||
480 | AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp backtrace backtrace_symbols malloc_usable_size mtrace]) | ||
481 | |||
482 | EFL_CHECK_FUNCS([EINA], [dirfd dlopen dladdr fnmatch iconv shm_open setxattr]) | 502 | EFL_CHECK_FUNCS([EINA], [dirfd dlopen dladdr fnmatch iconv shm_open setxattr]) |
483 | 503 | ||
484 | enable_log="no" | 504 | enable_log="no" |
@@ -648,8 +668,6 @@ EET_LIBS="${EET_LIBS} ${requirements_libs_deps_eet}" | |||
648 | 668 | ||
649 | ### Checks for header files | 669 | ### Checks for header files |
650 | 670 | ||
651 | AC_CHECK_HEADERS(netinet/in.h unistd.h) | ||
652 | |||
653 | ### Checks for types | 671 | ### Checks for types |
654 | 672 | ||
655 | ### Checks for structures | 673 | ### Checks for structures |