diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/configure.ac b/configure.ac index 53a640291..34c8608f3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -904,89 +904,6 @@ AM_CONDITIONAL([HAVE_POSTGRESQL], [test "x$postgres" = "x1"]) | |||
904 | AC_DEFINE_UNQUOTED([HAVE_POSTGRESQL], [$postgres], | 904 | AC_DEFINE_UNQUOTED([HAVE_POSTGRESQL], [$postgres], |
905 | [Define to 1 if Postgres is available]) | 905 | [Define to 1 if Postgres is available]) |
906 | 906 | ||
907 | # check for mysql | ||
908 | SAVE_LDFLAGS="$LDFLAGS" | ||
909 | SAVE_CPPFLAGS="$CPPFLAGS" | ||
910 | AC_ARG_WITH([mysql], | ||
911 | [AS_HELP_STRING([--with-mysql=PFX], [base of mysql installation])], | ||
912 | [AS_CASE([$withval], | ||
913 | [no], | ||
914 | [], | ||
915 | [yes|""], | ||
916 | [AC_CHECK_HEADERS([mysql/mysql.h], | ||
917 | [AC_CHECK_LIB([mysqlclient], [mysql_init], | ||
918 | [mysql=true], [mysql=false])])], | ||
919 | [LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS $ZLIBS" | ||
920 | CPPFLAGS="-I$with_mysql/include $CPPFLAGS" | ||
921 | AC_CHECK_HEADERS([mysql/mysql.h], | ||
922 | [AC_CHECK_LIB([mysqlclient], [mysql_init], | ||
923 | [MYSQL_LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql" | ||
924 | MYSQL_CPPFLAGS="-I$with_mysql/include" | ||
925 | mysql=true], | ||
926 | [mysql=false])])])], | ||
927 | [AS_IF([test -d "/usr/lib64/mysql"], | ||
928 | [MYSQL_LIBDIR="/usr/lib64/mysql"], | ||
929 | [AS_IF([test -d "/usr/lib/mysql"], | ||
930 | [MYSQL_LIBDIR="/usr/lib/mysql"], | ||
931 | [MYSQL_LIBDIR="/usr/lib"])]) | ||
932 | LDFLAGS="-L$MYSQL_LIBDIR $LDFLAGS $ZLIBS" | ||
933 | AC_CHECK_LIB([mysqlclient], [mysql_init], | ||
934 | [AC_CHECK_HEADERS([mysql/mysql.h], | ||
935 | [MYSQL_LDFLAGS="-L$MYSQL_LIBDIR" | ||
936 | mysql=true], | ||
937 | [mysql=false])], | ||
938 | [mysql=false])]) | ||
939 | AC_SUBST(MYSQL_LDFLAGS) | ||
940 | AC_SUBST(MYSQL_CPPFLAGS) | ||
941 | |||
942 | mysql_bool="bool" | ||
943 | # check for my_bool | ||
944 | AS_IF([test "x$mysql" = "xtrue"], | ||
945 | [AC_MSG_CHECKING([for my_bool]) | ||
946 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||
947 | [[#include <mysql/mysql.h>] | ||
948 | [typedef int my_bool;]])], # Hint: this fails if my_bool is defined already | ||
949 | [AC_MSG_RESULT([no]) | ||
950 | mysql_bool="bool"], | ||
951 | [AC_MSG_RESULT([yes]) | ||
952 | mysql_bool="my_bool"])]) | ||
953 | |||
954 | AC_SUBST([mysql_bool]) | ||
955 | |||
956 | # additional version checks for mysql | ||
957 | AS_IF([test "x$mysql" = "xtrue"], | ||
958 | [AC_MSG_CHECKING([for mysql version]) | ||
959 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||
960 | [[#include <mysql/mysql.h>]], | ||
961 | [[#if (MYSQL_VERSION_ID < 40100) | ||
962 | #error required at least version 4.1 | ||
963 | #endif]])], | ||
964 | [mysql=true], | ||
965 | [mysql=false]) | ||
966 | AS_IF([test "x$mysql" = "xfalse"], | ||
967 | [AC_MSG_RESULT([< 4.1]) | ||
968 | AC_MSG_RESULT([mysql version >= 4.1 required. Will not use MySQL])]) | ||
969 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||
970 | [[#include <mysql/mysql.h>]], | ||
971 | [[#if (MYSQL_VERSION_ID < 80000) | ||
972 | #error needs at least version 8.0 | ||
973 | #endif]])], | ||
974 | [mysql8=true], | ||
975 | [mysql8=false])]) | ||
976 | |||
977 | AS_IF([test "x$mysql" = "xtrue"], | ||
978 | [AS_IF([test "x$mysql8" = "xfalse"], | ||
979 | [AC_MSG_RESULT([between 4.1 and 8.0])], | ||
980 | [AC_MSG_RESULT([> 8.0]) | ||
981 | AC_DEFINE([HAVE_MYSQL8], [1], | ||
982 | [Define to 1 if MySQL is at least version 8])])]) | ||
983 | |||
984 | AM_CONDITIONAL([HAVE_MYSQL], [test "x$mysql" = "xtrue"]) | ||
985 | AM_CONDITIONAL([HAVE_MYSQLE], [false]) | ||
986 | |||
987 | AS_IF([test "x$sqlite3" = "x0" && test "x$mysql" = "xfalse" && test "x$postgres" = "x0"], | ||
988 | [AC_MSG_ERROR([GNUnet requires either SQLite, MySQL/MariaDB or PostgreSQL])]) | ||
989 | |||
990 | LDFLAGS="$SAVE_LDFLAGS" | 907 | LDFLAGS="$SAVE_LDFLAGS" |
991 | CPPFLAGS="$SAVE_CPPFLAGS" | 908 | CPPFLAGS="$SAVE_CPPFLAGS" |
992 | 909 | ||
@@ -1347,12 +1264,10 @@ src/identity/Makefile | |||
1347 | src/identity/identity.conf | 1264 | src/identity/identity.conf |
1348 | src/include/Makefile | 1265 | src/include/Makefile |
1349 | src/include/gnunet_config.h | 1266 | src/include/gnunet_config.h |
1350 | src/include/gnunet_mysql_compat.h | ||
1351 | src/integration-tests/Makefile | 1267 | src/integration-tests/Makefile |
1352 | src/json/Makefile | 1268 | src/json/Makefile |
1353 | src/hostlist/Makefile | 1269 | src/hostlist/Makefile |
1354 | src/my/Makefile | 1270 | src/my/Makefile |
1355 | src/mysql/Makefile | ||
1356 | src/namecache/Makefile | 1271 | src/namecache/Makefile |
1357 | src/namecache/namecache.conf | 1272 | src/namecache/namecache.conf |
1358 | src/namestore/Makefile | 1273 | src/namestore/Makefile |
@@ -1432,7 +1347,6 @@ pkgconfig/gnunetidentity.pc | |||
1432 | pkgconfig/gnunetjson.pc | 1347 | pkgconfig/gnunetjson.pc |
1433 | pkgconfig/gnunetmessenger.pc | 1348 | pkgconfig/gnunetmessenger.pc |
1434 | pkgconfig/gnunetmicrophone.pc | 1349 | pkgconfig/gnunetmicrophone.pc |
1435 | pkgconfig/gnunetmysql.pc | ||
1436 | pkgconfig/gnunetnamestore.pc | 1350 | pkgconfig/gnunetnamestore.pc |
1437 | pkgconfig/gnunetnat.pc | 1351 | pkgconfig/gnunetnat.pc |
1438 | pkgconfig/gnunetnse.pc | 1352 | pkgconfig/gnunetnse.pc |
@@ -1574,11 +1488,6 @@ AS_IF([test "x$sqlite3" = "x1"], | |||
1574 | features_msg="sqlite $features_msg"], | 1488 | features_msg="sqlite $features_msg"], |
1575 | [sqlite_msg="no"]) | 1489 | [sqlite_msg="no"]) |
1576 | 1490 | ||
1577 | AS_IF([test "x$mysql" = "xtrue"], | ||
1578 | [mysql_msg="yes" | ||
1579 | features_msg="mysql $features_msg"], | ||
1580 | [mysql_msg="no"]) | ||
1581 | |||
1582 | AS_IF([test "x$postgres" = "x1"], | 1491 | AS_IF([test "x$postgres" = "x1"], |
1583 | [postgres_msg="yes" | 1492 | [postgres_msg="yes" |
1584 | features_msg="postgres $features_msg"], | 1493 | features_msg="postgres $features_msg"], |
@@ -1607,7 +1516,6 @@ Build Target: ${build_target} | |||
1607 | Default Interface: ${interface_msg} | 1516 | Default Interface: ${interface_msg} |
1608 | 1517 | ||
1609 | sqlite3: ${sqlite_msg} | 1518 | sqlite3: ${sqlite_msg} |
1610 | MySQL: ${mysql_msg} | ||
1611 | PostgreSQL: ${postgres_msg} | 1519 | PostgreSQL: ${postgres_msg} |
1612 | 1520 | ||
1613 | cURL TLS backend: ${curl_tls_backend} | 1521 | cURL TLS backend: ${curl_tls_backend} |