<commit_before># $Id: acx_database_backend.m4 3015 2010-03-11 15:42:46Z jakob $

AC_DEFUN([ACX_DATABASE_BACKEND],[

	AC_ARG_WITH(database-backend,
	        AC_HELP_STRING([--database-backend],
	                [Select database backend (sqlite3|mysql)]),
			[database_backend="${enableval}"],
			[database_backend="sqlite3"])

	AC_MSG_CHECKING(for database backend)

	if test "x${database_backend}" = "xsqlite3"; then
		AC_MSG_RESULT(SQLite3)

		ACX_SQLITE3

		DB_TYPE=sqlite3 
		DB_INCLUDES=$SQLITE3_INCLUDES 
		DB_LIBS=$SQLITE3_LIBS 

		AC_DEFINE_UNQUOTED(SQL_BIN, "$SQLITE3", [database binary]) 
		AC_DEFINE_UNQUOTED(SQL_SETUP, "$OPENDNSSEC_DATA_DIR/database_create.sqlite3", [database setup script])

	elif test "x${database_backend}" = "xmysql"; then
		AC_MSG_RESULT(MySQL)

		ACX_MYSQL

	    	DB_TYPE=mysql
		DB_INCLUDES=$MYSQL_INCLUDES
		DB_LIBS=$MYSQL_LIBS

	        AC_DEFINE_UNQUOTED(SQL_BIN, "$MYSQL", [database binary]) 
		AC_DEFINE_UNQUOTED(SQL_SETUP, "$OPENDNSSEC_DATA_DIR/database_create.mysql", [database setup script])
	else
		AC_MSG_RESULT(Unknown)<commit_msg>enableval will only set "yes", but withval will use the given string.<commit_after># $Id: acx_database_backend.m4 3015 2010-03-11 15:42:46Z jakob $

AC_DEFUN([ACX_DATABASE_BACKEND],[

	AC_ARG_WITH(database-backend,
	        AC_HELP_STRING([--with-database-backend],
	                [Select database backend (sqlite3|mysql)]),
			[database_backend="${withval}"],
			[database_backend="sqlite3"])

	AC_MSG_CHECKING(for database backend)

	if test "x${database_backend}" = "xsqlite3"; then
		AC_MSG_RESULT(SQLite3)

		ACX_SQLITE3

		DB_TYPE=sqlite3 
		DB_INCLUDES=$SQLITE3_INCLUDES 
		DB_LIBS=$SQLITE3_LIBS 

		AC_DEFINE_UNQUOTED(SQL_BIN, "$SQLITE3", [database binary]) 
		AC_DEFINE_UNQUOTED(SQL_SETUP, "$OPENDNSSEC_DATA_DIR/database_create.sqlite3", [database setup script])

	elif test "x${database_backend}" = "xmysql"; then
		AC_MSG_RESULT(MySQL)

		ACX_MYSQL

	    	DB_TYPE=mysql
		DB_INCLUDES=$MYSQL_INCLUDES
		DB_LIBS=$MYSQL_LIBS

	        AC_DEFINE_UNQUOTED(SQL_BIN, "$MYSQL", [database binary]) 
		AC_DEFINE_UNQUOTED(SQL_SETUP, "$OPENDNSSEC_DATA_DIR/database_create.mysql", [database setup script])
	else
		AC_MSG_RESULT(Unknown)
{'fraction_non_alphanumeric': 0.11522819701762313, 'fraction_numerical': 0.026208766380478987, 'mean_word_length': 5.398843930635838, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5545621', 'n_tokens_mistral': 956, 'n_tokens_neox': 846, 'n_words': 128}