summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-17 16:35:38 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-17 16:35:38 +0000
commit8abaff3bdf53ecc7e605b82b12e385b8c0a02327 (patch)
tree4c828ae7083f724fd0214cf3624b20a7cf9448d2 /configure.ac
parent12732ab7ebcacad66352d3d48306e9945a4a584f (diff)
merge: add eet
SVN revision: 76768
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac411
1 files changed, 383 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index 475e677..72b13a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,6 +167,19 @@ AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"])
167 167
168#### Additional options to configure 168#### Additional options to configure
169 169
170# Assert or fail.
171
172AC_ARG_ENABLE([assert],
173 [AC_HELP_STRING([--enable-assert], [enable assert, @<:@default=no@:>@])],
174 [
175 if test "x${enableval}" = "xyes" ; then
176 prefer_assert="yes"
177 else
178 prefer_assert="no"
179 fi
180 ],
181 [prefer_assert="no"])
182
170 183
171#### Checks for programs 184#### Checks for programs
172 185
@@ -216,6 +229,8 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
216 229
217#### Checks for header files 230#### Checks for header files
218 231
232EFL_CHECK_PATH_MAX
233
219 234
220#### Checks for types 235#### Checks for types
221 236
@@ -225,6 +240,8 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
225 240
226#### Checks for compiler characteristics 241#### Checks for compiler characteristics
227 242
243AC_C_BIGENDIAN
244AC_C_INLINE
228EFL_ATTRIBUTE_UNUSED 245EFL_ATTRIBUTE_UNUSED
229# EFL_CHECK_COMPILER_FLAGS([MY_LIB], [-Wall -Wextra]) 246# EFL_CHECK_COMPILER_FLAGS([MY_LIB], [-Wall -Wextra])
230 247
@@ -242,6 +259,7 @@ AC_SUBST([lt_enable_auto_import])
242 259
243#### Checks for library functions 260#### Checks for library functions
244 261
262AC_FUNC_ALLOCA
245 263
246 264
247###################### EFL ###################### 265###################### EFL ######################
@@ -422,19 +440,6 @@ if test "x${have_stringshare_usage}" = "xyes"; then
422 AC_DEFINE([EINA_STRINGSHARE_USAGE], [1], [Report Eina stringshare usage pattern]) 440 AC_DEFINE([EINA_STRINGSHARE_USAGE], [1], [Report Eina stringshare usage pattern])
423fi 441fi
424 442
425# Assert or fail.
426
427AC_ARG_ENABLE([assert],
428 [AC_HELP_STRING([--enable-assert], [enable assert, @<:@default=no@:>@])],
429 [
430 if test "x${enableval}" = "xyes" ; then
431 prefer_assert="yes"
432 else
433 prefer_assert="no"
434 fi
435 ],
436 [prefer_assert="no"])
437
438# Check if we want to benchmark on real data 443# Check if we want to benchmark on real data
439AC_ARG_ENABLE([e17], 444AC_ARG_ENABLE([e17],
440 [AC_HELP_STRING([--enable-e17], [enable heavy benchmark @<:@default=no@:>@])], 445 [AC_HELP_STRING([--enable-e17], [enable heavy benchmark @<:@default=no@:>@])],
@@ -481,7 +486,7 @@ case "$host_vendor" in
481 ;; 486 ;;
482esac 487esac
483 488
484# Exotic library for copilation on Coyote 489# Exotic library for compilation on Coyote
485 490
486PKG_CHECK_EXISTS([exotic], 491PKG_CHECK_EXISTS([exotic],
487 [ 492 [
@@ -667,10 +672,6 @@ AC_SUBST([EINA_CONFIGURE_HAVE_DIRENT_H])
667 672
668### Checks for compiler characteristics 673### Checks for compiler characteristics
669 674
670AC_C_BIGENDIAN
671AC_C_INLINE
672EFL_ATTRIBUTE_UNUSED
673
674m4_ifdef([v_ver], 675m4_ifdef([v_ver],
675 [ 676 [
676 EFL_CHECK_COMPILER_FLAGS([EINA], [-Wall -Wextra]) 677 EFL_CHECK_COMPILER_FLAGS([EINA], [-Wall -Wextra])
@@ -678,16 +679,12 @@ m4_ifdef([v_ver],
678 679
679EFL_CHECK_COMPILER_FLAGS([EINA], [-Wshadow]) 680EFL_CHECK_COMPILER_FLAGS([EINA], [-Wshadow])
680 681
681EFL_CHECK_PATH_MAX
682
683### Checks for linker characteristics 682### Checks for linker characteristics
684 683
685EFL_CHECK_LINKER_FLAGS([EINA], [-fno-strict-aliasing]) 684EFL_CHECK_LINKER_FLAGS([EINA], [-fno-strict-aliasing])
686 685
687### Checks for library functions 686### Checks for library functions
688 687
689AC_FUNC_ALLOCA
690
691AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp backtrace backtrace_symbols malloc_usable_size mtrace]) 688AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp backtrace backtrace_symbols malloc_usable_size mtrace])
692 689
693EFL_CHECK_FUNCS([EINA], [dirfd dlopen dladdr fnmatch iconv shm_open setxattr]) 690EFL_CHECK_FUNCS([EINA], [dirfd dlopen dladdr fnmatch iconv shm_open setxattr])
@@ -752,21 +749,359 @@ EINA_CHECK_MODULE([one-big], [${enable_one_big}], [one big])
752 749
753#### Eet 750#### Eet
754 751
755#AC_MSG_NOTICE([Eet checks]) 752AC_MSG_NOTICE([Eet checks])
756 753
757### Default values 754### Default values
755
758### Additional options to configure 756### Additional options to configure
757
758EFL_ENABLE_BIN([eet])
759
760# Old eet file format support
761
762AC_ARG_ENABLE(old-eet-file-format,
763 [AC_HELP_STRING(
764 [--disable-old-eet-file-format],
765 [disable old eet file format support @<:@default=enabled@:>@])],
766 [
767 if test "x${enableval}" = "xyes" ; then
768 old_eet_file_format="yes"
769 else
770 old_eet_file_format="no"
771 fi
772 ],
773 [old_eet_file_format="yes"])
774
775AC_MSG_CHECKING([whether to support old eet file format])
776AC_MSG_RESULT([${old_eet_file_format}])
777
778if test "x${old_eet_file_format}" = "xyes" ; then
779 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
780else
781 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
782fi
783
784# Openssl support
785
786AC_ARG_ENABLE([openssl],
787 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support @<:@default=auto@:>@])],
788 [
789 if test "x${enableval}" = "xyes" ; then
790 want_openssl="yes"
791 else
792 want_openssl="no"
793 fi
794 ],
795 [want_openssl="auto"])
796
797AC_MSG_CHECKING([whether to use OpenSSL])
798AC_MSG_RESULT([${want_openssl}])
799
800# GnuTLS support
801
802AC_ARG_ENABLE([gnutls],
803 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support @<:@default=auto@:>@])],
804 [
805 if test "x${enableval}" = "xyes" ; then
806 want_gnutls="yes"
807 else
808 want_gnutls="no"
809 fi
810 ],
811 [want_gnutls="auto"])
812
813AC_MSG_CHECKING([whether to use Gnutls])
814AC_MSG_RESULT([${want_gnutls}])
815
816# Cryptography support
817
818AC_ARG_ENABLE([cipher],
819 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API @<:@default=yes@:>@])],
820 [
821 if test "x${enableval}" = "xyes" ; then
822 want_cipher="yes"
823 else
824 want_cipher="no"
825 fi
826 ],
827 [want_cipher="yes"])
828
829AC_MSG_CHECKING([whether to use cipher])
830AC_MSG_RESULT([${want_cipher}])
831
832AC_ARG_ENABLE([signature],
833 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet @<:@default=yes@:>@])],
834 [
835 if test "x${enableval}" = "xyes" ; then
836 want_signature="yes"
837 else
838 want_signature="no"
839 fi
840 ],
841 [want_signature="yes"])
842
843AC_MSG_CHECKING([whether to use signature])
844AC_MSG_RESULT([${want_signature}])
845
759### Checks for programs 846### Checks for programs
847
760### Checks for libraries 848### Checks for libraries
849
850## Compatibility layers
851
852# Evil library for compilation on Windows
853
854EFL_EET_BUILD=""
855case "$host_os" in
856 mingw*)
857 PKG_CHECK_EXISTS([evil >= 1.1.0])
858 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil package is installed])
859 requirements_pc_eet="evil ${requirements_pc_eet}"
860 EFL_EET_BUILD="-DEFL_EET_BUILD"
861 ;;
862esac
863AC_SUBST(EFL_EET_BUILD)
864
865# Exotic library for compilation on Coyote
866
867PKG_CHECK_EXISTS([exotic],
868 [
869 enable_exotic="yes"
870 AC_DEFINE([HAVE_EXOTIC_H], [1], [Define to 1 if you have Exotic.])
871 requirements_pc_eet="exotic ${requirements_pc_eet}"
872 ],
873 [enable_exotic="no"])
874
875## Secure layer
876
877# Gnutls library
878
879have_gnutls="no"
880if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
881 PKG_CHECK_MODULES([GNUTLS], [gnutls >= 1.7.6],
882 [
883 have_gnutls="yes"
884 want_openssl="no"
885 AC_DEFINE([HAVE_GNUTLS], [1], [Have Gnutls support])
886 requirements_pc_eet="gnutls >= 1.7.6 ${requirements_pc_eet}"
887 ],
888 [have_gnutls="no"])
889fi
890
891# libgcrypt
892
893if test "x${have_gnutls}" = "xyes" ; then
894 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
895 if test "x${have_gnutls}" = "xyes" ; then
896 requirements_libs_eet="${LIBGCRYPT_LIBS} ${requirements_libs_eet}"
897 fi
898fi
899
900# Specific GNUTLS improvement
901
902AC_ARG_ENABLE(new-gnutls-api,
903 [AC_HELP_STRING(
904 [--disable-new-gnutls-api],
905 [enable use of gnutls_x509_crt_verify_hash. @<:@default=yes@:>@])],
906 [
907 if test "x${enableval}" = "xyes" ; then
908 new_gnutls_api="yes"
909 else
910 new_gnutls_api="no"
911 fi
912 ],
913 [new_gnutls_api="yes"])
914
915AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
916AC_MSG_RESULT([${new_gnutls_api}])
917
918if test "x${have_gnutls}" = "xyes" && test "x${new_gnutls_api}" = "xyes" ; then
919 CFLAGS_save="${CFLAGS}"
920 LIBS_save="${LIBS}"
921 CFLAGS="${GNUTLS_CFLAGS}"
922 LIBS="${GNUTLS_LIBS}"
923 AC_CHECK_LIB([gnutls], [gnutls_x509_crt_verify_hash],
924 [
925 AC_DEFINE([EET_USE_NEW_GNUTLS_API], [1], [use gnutls_x509_crt_verify_hash])
926 new_gnutls_api="yes"
927 ],
928 [new_gnutls_api="no"])
929 CFLAGS="${CFLAGS_save}"
930 LIBS="${LIBS_save}"
931fi
932
933use_gnutls_privkey_sign_data="no"
934if test "x${have_gnutls}" = "xyes" ; then
935 CFLAGS_save="${CFLAGS}"
936 LIBS_save="${LIBS}"
937 CFLAGS="${GNUTLS_CFLAGS}"
938 LIBS="${GNUTLS_LIBS}"
939 AC_CHECK_LIB([gnutls], [gnutls_privkey_sign_data],
940 [
941 AC_DEFINE([EET_USE_NEW_PRIVKEY_SIGN_DATA], [1], [use gnutls_privkey_sign_data])
942 use_gnutls_privkey_sign_data="yes"
943 ],
944 [use_gnutls_privkey_sign_data="no"])
945 CFLAGS="${CFLAGS_save}"
946 LIBS="${LIBS_save}"
947fi
948
949AC_MSG_CHECKING([whether to use gnutls_privkey_sign_data])
950AC_MSG_RESULT([${use_gnutls_privkey_sign_data}])
951
952use_gnutls_pubkey_verify_hash="no"
953if test "x${have_gnutls}" = "xyes" ; then
954 CFLAGS_save="${CFLAGS}"
955 LIBS_save="${LIBS}"
956 CFLAGS="${GNUTLS_CFLAGS}"
957 LIBS="${GNUTLS_LIBS}"
958 AC_CHECK_LIB([gnutls], [gnutls_pubkey_verify_hash],
959 [
960 AC_DEFINE([EET_USE_NEW_PUBKEY_VERIFY_HASH], [1], [use gnutls_pubkey_verify_hash])
961 use_gnutls_pubkey_verify_hash="yes"
962 ],
963 [use_gnutls_pubkey_verify_hash="no"])
964 CFLAGS="${CFLAGS_save}"
965 LIBS="${LIBS_save}"
966fi
967
968AC_MSG_CHECKING([whether to use gnutls_pubkey_verify_hash])
969AC_MSG_RESULT([${use_gnutls_pubkey_verify_hash}])
970
971# Openssl library
972
973have_openssl="no"
974if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
975 PKG_CHECK_EXISTS([openssl],
976 [
977 have_openssl="yes"
978 AC_DEFINE([HAVE_OPENSSL], [1], [Have Openssl support])
979 requirements_pc_eet="openssl ${requirements_pc_eet}"
980 ],
981 [have_openssl="no"])
982fi
983
984if test "x${have_gnutls}" = "xyes" ; then
985 secure_layer="GnuTLS"
986elif test "x${have_openssl}" = "xyes" ; then
987 secure_layer="OpenSSL"
988else
989 secure_layer="no"
990fi
991
992# Cryptography support
993
994have_cipher="no"
995if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
996 have_cipher="yes"
997 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
998elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
999 have_cipher="yes"
1000 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
1001fi
1002
1003AC_MSG_CHECKING([whether to activate cipher support in eet])
1004AC_MSG_RESULT([${have_cipher}])
1005
1006have_signature="no"
1007if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
1008 have_signature="yes"
1009 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
1010elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
1011 have_signature="yes"
1012 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
1013fi
1014
1015AC_MSG_CHECKING([whether to activate signature support in eet])
1016AC_MSG_RESULT([${have_signature}])
1017
1018# libjpeg and zlib
1019
1020EFL_CHECK_LIBS([eet], [libjpeg zlib])
1021
1022# Eina library
1023
1024requirements_pc_eet="eina >= 1.2.0 ${requirements_pc_eet}"
1025PKG_CHECK_MODULES([EET], [${requirements_pc_eet}])
1026
1027case "$host_os" in
1028 mingw32ce*)
1029 requirements_libs_eet="${requirements_libs_eet} -lws2"
1030 ;;
1031 mingw*)
1032 requirements_libs_eet="${requirements_libs_eet} -lws2_32"
1033 ;;
1034esac
1035
1036EET_LIBS="${EET_LIBS} ${requirements_libs_eet}"
1037
761### Checks for header files 1038### Checks for header files
1039
1040AC_CHECK_HEADERS(netinet/in.h unistd.h)
1041
762### Checks for types 1042### Checks for types
1043
763### Checks for structures 1044### Checks for structures
1045
764### Checks for compiler characteristics 1046### Checks for compiler characteristics
1047
1048# Check whether the null pointer is zero on this arch
1049AC_TRY_RUN(
1050 [
1051#include <stdlib.h>
1052#include <inttypes.h>
1053int main (int argc, char **argv) {
1054 void *foo = NULL;
1055 uintptr_t bar = (uintptr_t)foo;
1056 return (uintptr_t)foo;
1057}
1058 ],
1059 [have_null="yes"],
1060 [have_null="no"],
1061 [
1062 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
1063 have_null="yes"
1064 ])
1065AC_MSG_CHECKING([value of the null pointer])
1066AC_MSG_RESULT([${have_null}])
1067
1068if test ! "x${have_null}" = "xyes" ; then
1069 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
1070fi
1071
765### Checks for linker characteristics 1072### Checks for linker characteristics
1073
1074case "${host_os}" in
1075 openbsd*)
1076 ;;
1077 *)
1078 EFL_CHECK_LINKER_FLAGS([EET], [-Wl,--as-needed])
1079 ;;
1080esac
1081
766### Checks for library functions 1082### Checks for library functions
767 1083
768#### End of Eet 1084#### End of Eet
769 1085
1086
1087#### Evas
1088
1089#AC_MSG_NOTICE([Evas checks])
1090
1091### Default values
1092### Additional options to configure
1093### Checks for programs
1094### Checks for libraries
1095### Checks for header files
1096### Checks for types
1097### Checks for structures
1098### Checks for compiler characteristics
1099### Checks for linker characteristics
1100### Checks for library functions
1101
1102#### End of Evas
1103
1104
770AC_CONFIG_FILES([ 1105AC_CONFIG_FILES([
771Makefile 1106Makefile
772src/Makefile 1107src/Makefile
@@ -774,14 +1109,17 @@ src/benchmarks/Makefile
774src/benchmarks/eina/Makefile 1109src/benchmarks/eina/Makefile
775src/bin/Makefile 1110src/bin/Makefile
776src/bin/evil/Makefile 1111src/bin/evil/Makefile
1112src/bin/eet/Makefile
777src/examples/Makefile 1113src/examples/Makefile
778src/examples/eina/Makefile 1114src/examples/eina/Makefile
1115src/examples/eet/Makefile
779src/include/Makefile 1116src/include/Makefile
780src/include/eina/Makefile 1117src/include/eina/Makefile
781src/include/eina/eina_config.h 1118src/include/eina/eina_config.h
782src/lib/Makefile 1119src/lib/Makefile
783src/lib/evil/Makefile 1120src/lib/evil/Makefile
784src/lib/eina/Makefile 1121src/lib/eina/Makefile
1122src/lib/eet/Makefile
785src/modules/Makefile 1123src/modules/Makefile
786src/modules/eina/Makefile 1124src/modules/eina/Makefile
787src/modules/eina/mp/Makefile 1125src/modules/eina/mp/Makefile
@@ -796,9 +1134,12 @@ src/scripts/Makefile
796src/scripts/eina/Makefile 1134src/scripts/eina/Makefile
797src/tests/Makefile 1135src/tests/Makefile
798src/tests/eina/Makefile 1136src/tests/eina/Makefile
1137src/tests/eet/Makefile
799eina.spec 1138eina.spec
1139eet.spec
800evil.pc 1140evil.pc
801eina.pc 1141eina.pc
1142eet.pc
802]) 1143])
803 1144
804AC_OUTPUT 1145AC_OUTPUT
@@ -842,11 +1183,11 @@ echo " File dirfd...........: ${efl_func_dirfd}"
842echo " File xattr...........: ${efl_func_setxattr}" 1183echo " File xattr...........: ${efl_func_setxattr}"
843echo " shm_open.............: ${efl_func_shm_open}" 1184echo " shm_open.............: ${efl_func_shm_open}"
844echo 1185echo
845echo " Tests................: ${_efl_enable_tests} (Coverage: ${_efl_enable_coverage})" 1186echo " Tests................: make check (Coverage: ${_efl_enable_coverage})"
846echo " Examples.............: ${enable_build_examples}" 1187echo " Examples.............: make examples"
847echo " Tiler Example........: ${build_tiler_example}" 1188echo " Tiler Example......: ${build_tiler_example}"
848echo " Examples installed...: ${enable_install_examples}" 1189echo " installation.......: make install-examples"
849echo " Benchmark............: ${enable_benchmark}" 1190echo " Benchmark............: make benchmark"
850if test "x${enable_benchmark}" = "xyes" ; then 1191if test "x${enable_benchmark}" = "xyes" ; then
851echo " Glib...............: ${enable_benchmark_glib}" 1192echo " Glib...............: ${enable_benchmark_glib}"
852echo " E17 real data......: ${enable_benchmark_e17}" 1193echo " E17 real data......: ${enable_benchmark_e17}"
@@ -861,6 +1202,20 @@ echo " Fixed bitmap.......: ${enable_fixed_bitmap}"
861echo " One big............: ${enable_one_big}" 1202echo " One big............: ${enable_one_big}"
862echo " Pass through.......: ${enable_pass_through}" 1203echo " Pass through.......: ${enable_pass_through}"
863echo 1204echo
1205echo "Eet"
1206echo
1207echo " Secure layer.........: ${secure_layer}"
1208if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then
1209 echo " Cipher support.....: ${have_cipher}"
1210 echo " Signature..........: ${have_signature}"
1211fi
1212echo
1213echo " Old eet file format..: ${old_eet_file_format}"
1214echo
1215echo " Tests................: make check (Coverage: ${_efl_enable_coverage})"
1216echo " Examples.............: make examples"
1217echo " installation.......: make install-examples"
1218echo
864echo "Compilation............: make (or gmake)" 1219echo "Compilation............: make (or gmake)"
865echo " CPPFLAGS.............: $CPPFLAGS" 1220echo " CPPFLAGS.............: $CPPFLAGS"
866echo " CFLAGS...............: $CFLAGS" 1221echo " CFLAGS...............: $CFLAGS"