diff --git a/configure.ac b/configure.ac index bda37020..ee5a9a04 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([src/config.h]) AM_INIT_AUTOMAKE([foreign subdir-objects]) -AX_PREFIX_CONFIG_H([src/prof_config.h], [PROF], [src/config.h]) +#AX_PREFIX_CONFIG_H([src/prof_config.h], [PROF], [src/config.h]) ### Checks for programs. AC_PROG_CC diff --git a/src/command/command.c b/src/command/command.c index 2f4fb8d2..9fa69816 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -59,10 +59,10 @@ #include "log.h" #include "muc.h" #include "plugins/plugins.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include "otr/otr.h" #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME #include "pgp/gpg.h" #endif #include "profanity.h" @@ -2778,7 +2778,7 @@ cmd_reset_autocomplete(ProfWin *window) tlscerts_reset_ac(); prefs_reset_boolean_choice(); presence_reset_sub_request_search(); -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME p_gpg_autocomplete_key_reset(); #endif autocomplete_reset(help_ac); @@ -3678,7 +3678,7 @@ _pgp_autocomplete(ProfWin *window, const char *const input) return found; } -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME gboolean result; gchar **args = parse_args(input, 2, 3, &result); if ((strncmp(input, "/pgp", 4) == 0) && (result == TRUE)) { @@ -4599,7 +4599,7 @@ _account_autocomplete(ProfWin *window, const char *const input) if (found) { return found; } -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME } else if ((g_strv_length(args) > 3) && (g_strcmp0(args[2], "pgpkeyid")) == 0) { g_string_append(beginning, " "); g_string_append(beginning, args[2]); diff --git a/src/command/commands.c b/src/command/commands.c index fe93b069..da6fdec8 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -61,10 +61,10 @@ #include "jid.h" #include "log.h" #include "muc.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include "otr/otr.h" #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME #include "pgp/gpg.h" #endif #include "profanity.h" @@ -180,7 +180,7 @@ gboolean cmd_tls(ProfWin *window, const char *const command, gchar **args) { if (g_strcmp0(args[0], "certpath") == 0) { -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE if (g_strcmp0(args[1], "set") == 0) { if (args[2] == NULL) { cons_bad_cmd_usage(command); @@ -216,7 +216,7 @@ cmd_tls(ProfWin *window, const char *const command, gchar **args) return TRUE; #endif } else if (g_strcmp0(args[0], "trust") == 0) { -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE jabber_conn_status_t conn_status = jabber_get_connection_status(); if (conn_status != JABBER_CONNECTED) { cons_show("You are not currently connected."); @@ -245,7 +245,7 @@ cmd_tls(ProfWin *window, const char *const command, gchar **args) return TRUE; #endif } else if (g_strcmp0(args[0], "trusted") == 0) { -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE GList *certs = tlscerts_list(); GList *curr = certs; @@ -268,7 +268,7 @@ cmd_tls(ProfWin *window, const char *const command, gchar **args) return TRUE; #endif } else if (g_strcmp0(args[0], "revoke") == 0) { -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE if (args[1] == NULL) { cons_bad_cmd_usage(command); } else { @@ -287,7 +287,7 @@ cmd_tls(ProfWin *window, const char *const command, gchar **args) } else if (g_strcmp0(args[0], "show") == 0) { return _cmd_set_boolean_preference(args[1], command, "TLS titlebar indicator", PREF_TLS_SHOW); } else if (g_strcmp0(args[0], "cert") == 0) { -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE if (args[1]) { TLSCertificate *cert = tlscerts_get_trusted(args[1]); if (!cert) { @@ -667,7 +667,7 @@ cmd_account(ProfWin *window, const char *const command, gchar **args) } cons_show(""); } else if (strcmp(property, "pgpkeyid") == 0) { -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME char *err_str = NULL; if (!p_gpg_valid_key(value, &err_str)) { cons_show("Invalid PGP key ID specified: %s, see /pgp keys", err_str); @@ -1926,7 +1926,7 @@ cmd_msg(ProfWin *window, const char *const command, gchar **args) if (msg) { cl_ev_send_msg(chatwin, msg); } else { -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR if (otr_is_secure(barejid)) { chatwin_otr_secured(chatwin, otr_is_trusted(barejid)); } @@ -2814,7 +2814,7 @@ cmd_resource(ProfWin *window, const char *const command, gchar **args) return TRUE; } -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR if (otr_is_secure(chatwin->barejid)) { cons_show("Cannot choose resource during an OTR session."); return TRUE; @@ -5666,7 +5666,7 @@ cmd_plugins(ProfWin *window, const char *const command, gchar **args) gboolean cmd_pgp(ProfWin *window, const char *const command, gchar **args) { -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME if (args[0] == NULL) { cons_bad_cmd_usage(command); return TRUE; @@ -5903,7 +5903,7 @@ cmd_pgp(ProfWin *window, const char *const command, gchar **args) gboolean cmd_otr(ProfWin *window, const char *const command, gchar **args) { -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR if (args[0] == NULL) { cons_bad_cmd_usage(command); return TRUE; diff --git a/src/common.c b/src/common.c index d6e48db0..ad66015f 100644 --- a/src/common.c +++ b/src/common.c @@ -31,7 +31,7 @@ * source files in the program, then also delete it here. * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -46,9 +46,9 @@ #include #include -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif @@ -347,7 +347,7 @@ release_is_new(char *found_version) { int curr_maj, curr_min, curr_patch, found_maj, found_min, found_patch; - int parse_curr = sscanf(PROF_PACKAGE_VERSION, "%d.%d.%d", &curr_maj, &curr_min, + int parse_curr = sscanf(PACKAGE_VERSION, "%d.%d.%d", &curr_maj, &curr_min, &curr_patch); int parse_found = sscanf(found_version, "%d.%d.%d", &found_maj, &found_min, &found_patch); @@ -657,13 +657,13 @@ is_notify_enabled(void) { gboolean notify_enabled = FALSE; -#ifdef PROF_HAVE_OSXNOTIFY +#ifdef HAVE_OSXNOTIFY notify_enabled = TRUE; #endif -#ifdef PROF_HAVE_LIBNOTIFY +#ifdef HAVE_LIBNOTIFY notify_enabled = TRUE; #endif -#ifdef PROF_PLATFORM_CYGWIN +#ifdef PLATFORM_CYGWIN notify_enabled = TRUE; #endif diff --git a/src/config/preferences.c b/src/config/preferences.c index f12e88d7..968787e3 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include diff --git a/src/config/preferences.h b/src/config/preferences.h index f859201c..1ab18d31 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -35,7 +35,7 @@ #ifndef PREFERENCES_H #define PREFERENCES_H -#include "prof_config.h" +#include "config.h" #include diff --git a/src/config/theme.c b/src/config/theme.c index e884f0c3..a4f5df65 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -32,15 +32,15 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include #include -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif diff --git a/src/config/theme.h b/src/config/theme.h index b8547716..4e9bc8e7 100644 --- a/src/config/theme.h +++ b/src/config/theme.h @@ -35,7 +35,7 @@ #ifndef THEME_H #define THEME_H -#include "prof_config.h" +#include "config.h" #include diff --git a/src/event/client_events.c b/src/event/client_events.c index c077a389..20a1a861 100644 --- a/src/event/client_events.c +++ b/src/event/client_events.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -44,10 +44,10 @@ #include "roster_list.h" #include "chat_session.h" #include "plugins/plugins.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include "otr/otr.h" #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME #include "pgp/gpg.h" #endif @@ -81,7 +81,7 @@ cl_ev_disconnect(void) muc_invites_clear(); chat_sessions_clear(); tlscerts_clear_current(); -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME p_gpg_on_disconnect(); #endif } @@ -91,7 +91,7 @@ cl_ev_presence_send(const resource_presence_t presence_type, const char *const m { char *signed_status = NULL; -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME char *account_name = jabber_get_account_name(); ProfAccount *account = accounts_get_account(account_name); if (account->pgp_keyid) { @@ -112,8 +112,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg) char *plugin_msg = plugins_pre_chat_message_send(chatwin->barejid, msg); // OTR suported, PGP supported -#ifdef PROF_HAVE_LIBOTR -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBOTR +#ifdef HAVE_LIBGPGME if (chatwin->pgp_send) { char *id = message_send_chat_pgp(chatwin->barejid, plugin_msg); chat_log_pgp_msg_out(chatwin->barejid, plugin_msg); @@ -136,8 +136,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg) #endif // OTR supported, PGP unsupported -#ifdef PROF_HAVE_LIBOTR -#ifndef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBOTR +#ifndef HAVE_LIBGPGME gboolean handled = otr_on_message_send(chatwin, plugin_msg); if (!handled) { char *id = message_send_chat(chatwin->barejid, plugin_msg); @@ -153,8 +153,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg) #endif // OTR unsupported, PGP supported -#ifndef PROF_HAVE_LIBOTR -#ifdef PROF_HAVE_LIBGPGME +#ifndef HAVE_LIBOTR +#ifdef HAVE_LIBGPGME if (chatwin->pgp_send) { char *id = message_send_chat_pgp(chatwin->barejid, plugin_msg); chat_log_pgp_msg_out(chatwin->barejid, plugin_msg); @@ -174,8 +174,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg) #endif // OTR unsupported, PGP unsupported -#ifndef PROF_HAVE_LIBOTR -#ifndef PROF_HAVE_LIBGPGME +#ifndef HAVE_LIBOTR +#ifndef HAVE_LIBGPGME char *id = message_send_chat(chatwin->barejid, plugin_msg); chat_log_msg_out(chatwin->barejid, plugin_msg); chatwin_outgoing_msg(chatwin, plugin_msg, id, PROF_MSG_PLAIN); diff --git a/src/event/server_events.c b/src/event/server_events.c index 2a0d458c..48e79d3b 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -51,10 +51,10 @@ #include "profanity.h" #include "event/client_events.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include "otr/otr.h" #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME #include "pgp/gpg.h" #endif @@ -67,11 +67,11 @@ sv_ev_login_account_success(char *account_name, int secured) roster_create(); -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR otr_on_connect(account); #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME p_gpg_on_connect(account->jid); #endif @@ -107,7 +107,7 @@ sv_ev_roster_received(void) char *account_name = jabber_get_account_name(); -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME // check pgp key valid if specified ProfAccount *account = accounts_get_account(account_name); if (account && account->pgp_keyid) { @@ -157,7 +157,7 @@ sv_ev_lost_connection(void) { cons_show_error("Lost connection."); -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR GSList *recipients = wins_get_chat_recipients(); GSList *curr = recipients; while (curr) { @@ -178,7 +178,7 @@ sv_ev_lost_connection(void) chat_sessions_clear(); ui_disconnected(); roster_destroy(); -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME p_gpg_on_disconnect(); #endif } @@ -358,7 +358,7 @@ sv_ev_outgoing_carbon(char *barejid, char *message, char *pgp_message) chat_state_active(chatwin->state); -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME if (pgp_message) { char *decrypted = p_gpg_decrypt(pgp_message); if (decrypted) { @@ -374,7 +374,7 @@ sv_ev_outgoing_carbon(char *barejid, char *message, char *pgp_message) #endif } -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME static void _sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, char *barejid, char *resource, char *message, char *pgp_message, GDateTime *timestamp) { @@ -392,7 +392,7 @@ _sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, char *barejid, char } #endif -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR static void _sv_ev_incoming_otr(ProfChatWin *chatwin, gboolean new_win, char *barejid, char *resource, char *message, GDateTime *timestamp) { @@ -432,8 +432,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m } // OTR suported, PGP supported -#ifdef PROF_HAVE_LIBOTR -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBOTR +#ifdef HAVE_LIBGPGME if (pgp_message) { if (chatwin->is_otr) { win_println((ProfWin*)chatwin, 0, "PGP encrypted message received whilst in OTR session."); @@ -449,8 +449,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m #endif // OTR supported, PGP unsupported -#ifdef PROF_HAVE_LIBOTR -#ifndef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBOTR +#ifndef HAVE_LIBGPGME _sv_ev_incoming_otr(chatwin, new_win, barejid, resource, message, timestamp); rosterwin_roster(); return; @@ -458,8 +458,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m #endif // OTR unsupported, PGP supported -#ifndef PROF_HAVE_LIBOTR -#ifdef PROF_HAVE_LIBGPGME +#ifndef HAVE_LIBOTR +#ifdef HAVE_LIBGPGME if (pgp_message) { _sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, pgp_message, timestamp); } else { @@ -471,8 +471,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m #endif // OTR unsupported, PGP unsupported -#ifndef PROF_HAVE_LIBOTR -#ifndef PROF_HAVE_LIBGPGME +#ifndef HAVE_LIBOTR +#ifndef HAVE_LIBGPGME _sv_ev_incoming_plain(chatwin, new_win, barejid, resource, message, timestamp); rosterwin_roster(); return; @@ -491,7 +491,7 @@ sv_ev_incoming_carbon(char *barejid, char *resource, char *message, char *pgp_me new_win = TRUE; } -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME if (pgp_message) { _sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, pgp_message, NULL); } else { @@ -608,7 +608,7 @@ sv_ev_contact_offline(char *barejid, char *resource, char *status) ui_contact_offline(barejid, resource, status); } -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR ProfChatWin *chatwin = wins_get_chat(barejid); if (chatwin && otr_is_secure(barejid)) { chatwin_otr_unsecured(chatwin); @@ -631,7 +631,7 @@ sv_ev_contact_online(char *barejid, Resource *resource, GDateTime *last_activity ui_contact_online(barejid, resource, last_activity); } -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME if (pgpsig) { p_gpg_verify(barejid, pgpsig); } diff --git a/src/main.c b/src/main.c index 147d0b11..128aecda 100644 --- a/src/main.c +++ b/src/main.c @@ -32,12 +32,12 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include -#ifdef PROF_HAVE_GIT_VERSION +#ifdef HAVE_GIT_VERSION #include "gitversion.h" #endif @@ -52,7 +52,7 @@ static char *account_name = NULL; int main(int argc, char **argv) { - if (argc == 2 && g_strcmp0(argv[1], "docgen") == 0 && g_strcmp0(PROF_PACKAGE_STATUS, "development") == 0) { + if (argc == 2 && g_strcmp0(argv[1], "docgen") == 0 && g_strcmp0(PACKAGE_STATUS, "development") == 0) { command_docgen(); return 0; } @@ -80,17 +80,17 @@ main(int argc, char **argv) g_option_context_free(context); if (version == TRUE) { - if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) { -#ifdef PROF_HAVE_GIT_VERSION - g_print("Profanity, version %sdev.%s.%s\n", PROF_PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION); + if (strcmp(PACKAGE_STATUS, "development") == 0) { +#ifdef HAVE_GIT_VERSION + g_print("Profanity, version %sdev.%s.%s\n", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION); #else - g_print("Profanity, version %sdev\n", PROF_PACKAGE_VERSION); + g_print("Profanity, version %sdev\n", PACKAGE_VERSION); #endif } else { - g_print("Profanity, version %s\n", PROF_PACKAGE_VERSION); + g_print("Profanity, version %s\n", PACKAGE_VERSION); } - g_print("Copyright (C) 2012 - 2016 James Booth <%s>.\n", PROF_PACKAGE_BUGREPORT); + g_print("Copyright (C) 2012 - 2016 James Booth <%s>.\n", PACKAGE_BUGREPORT); g_print("License GPLv3+: GNU GPL version 3 or later \n"); g_print("\n"); g_print("This is free software; you are free to change and redistribute it.\n"); @@ -99,10 +99,10 @@ main(int argc, char **argv) g_print("Build information:\n"); -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE g_print("XMPP library: libmesode\n"); #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE g_print("XMPP library: libstrophe\n"); #endif @@ -112,25 +112,25 @@ main(int argc, char **argv) g_print("Desktop notification support: Disabled\n"); } -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR g_print("OTR support: Enabled\n"); #else g_print("OTR support: Disabled\n"); #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME g_print("PGP support: Enabled\n"); #else g_print("PGP support: Disabled\n"); #endif -#ifdef PROF_HAVE_C +#ifdef HAVE_C g_print("C plugins: Enabled\n"); #else g_print("C plugins: Disabled\n"); #endif -#ifdef PROF_HAVE_PYTHON +#ifdef HAVE_PYTHON g_print("Python plugins: Enabled\n"); #else g_print("Python plugins: Disabled\n"); diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index 8900915b..dce72cd2 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c index e8821957..87b892d1 100644 --- a/src/plugins/plugins.c +++ b/src/plugins/plugins.c @@ -35,7 +35,7 @@ #include #include -#include "prof_config.h" +#include "config.h" #include "common.h" #include "config/preferences.h" #include "log.h" @@ -46,12 +46,12 @@ #include "plugins/themes.h" #include "plugins/settings.h" -#ifdef PROF_HAVE_PYTHON +#ifdef HAVE_PYTHON #include "plugins/python_plugins.h" #include "plugins/python_api.h" #endif -#ifdef PROF_HAVE_C +#ifdef HAVE_C #include "plugins/c_plugins.h" #include "plugins/c_api.h" #endif @@ -67,10 +67,10 @@ plugins_init(void) callbacks_init(); autocompleters_init(); -#ifdef PROF_HAVE_PYTHON +#ifdef HAVE_PYTHON python_env_init(); #endif -#ifdef PROF_HAVE_C +#ifdef HAVE_C c_env_init(); #endif @@ -85,7 +85,7 @@ plugins_init(void) { gboolean loaded = FALSE; gchar *filename = plugins_load[i]; -#ifdef PROF_HAVE_PYTHON +#ifdef HAVE_PYTHON if (g_str_has_suffix(filename, ".py")) { ProfPlugin *plugin = python_plugin_create(filename); if (plugin) { @@ -94,7 +94,7 @@ plugins_init(void) } } #endif -#ifdef PROF_HAVE_C +#ifdef HAVE_C if (g_str_has_suffix(filename, ".so")) { ProfPlugin *plugin = c_plugin_create(filename); if (plugin) { @@ -112,7 +112,7 @@ plugins_init(void) GSList *curr = plugins; while (curr) { ProfPlugin *plugin = curr->data; - plugin->init_func(plugin, PROF_PACKAGE_VERSION, PROF_PACKAGE_STATUS); + plugin->init_func(plugin, PACKAGE_VERSION, PACKAGE_STATUS); curr = g_slist_next(curr); } } @@ -554,12 +554,12 @@ plugins_shutdown(void) GSList *curr = plugins; while (curr) { -#ifdef PROF_HAVE_PYTHON +#ifdef HAVE_PYTHON if (((ProfPlugin *)curr->data)->lang == LANG_PYTHON) { python_plugin_destroy(curr->data); } #endif -#ifdef PROF_HAVE_C +#ifdef HAVE_C if (((ProfPlugin *)curr->data)->lang == LANG_C) { c_plugin_destroy(curr->data); } @@ -567,10 +567,10 @@ plugins_shutdown(void) curr = g_slist_next(curr); } -#ifdef PROF_HAVE_PYTHON +#ifdef HAVE_PYTHON python_shutdown(); #endif -#ifdef PROF_HAVE_C +#ifdef HAVE_C c_shutdown(); #endif diff --git a/src/profanity.c b/src/profanity.c index 60265675..a78ccfdc 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -31,9 +31,9 @@ * source files in the program, then also delete it here. * */ -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_GIT_VERSION +#ifdef HAVE_GIT_VERSION #include "gitversion.h" #endif @@ -60,10 +60,10 @@ #include "log.h" #include "muc.h" #include "plugins/plugins.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include "otr/otr.h" #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME #include "pgp/gpg.h" #endif #include "resource.h" @@ -122,7 +122,7 @@ prof_run(char *log_level, char *account_name) cont = TRUE; } -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR otr_poll(); #endif plugins_run_timed(); @@ -322,14 +322,14 @@ _init(char *log_level) prefs_load(); log_init(prof_log_level); log_stderr_init(PROF_LEVEL_ERROR); - if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) { -#ifdef PROF_HAVE_GIT_VERSION - log_info("Starting Profanity (%sdev.%s.%s)...", PROF_PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION); + if (strcmp(PACKAGE_STATUS, "development") == 0) { +#ifdef HAVE_GIT_VERSION + log_info("Starting Profanity (%sdev.%s.%s)...", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION); #else - log_info("Starting Profanity (%sdev)...", PROF_PACKAGE_VERSION); + log_info("Starting Profanity (%sdev)...", PACKAGE_VERSION); #endif } else { - log_info("Starting Profanity (%s)...", PROF_PACKAGE_VERSION); + log_info("Starting Profanity (%s)...", PACKAGE_VERSION); } chat_log_init(); groupchat_log_init(); @@ -344,10 +344,10 @@ _init(char *log_level) muc_init(); tlscerts_init(); scripts_init(); -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR otr_init(); #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME p_gpg_init(); #endif atexit(_shutdown); @@ -376,10 +376,10 @@ _shutdown(void) muc_close(); caps_close(); ui_close(); -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR otr_shutdown(); #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME p_gpg_close(); #endif chat_log_close(); diff --git a/src/ui/buffer.c b/src/ui/buffer.c index 49b701b3..29eddd89 100644 --- a/src/ui/buffer.c +++ b/src/ui/buffer.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -40,9 +40,9 @@ #include #include -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif diff --git a/src/ui/buffer.h b/src/ui/buffer.h index ef55e17e..ce9763ed 100644 --- a/src/ui/buffer.h +++ b/src/ui/buffer.h @@ -35,7 +35,7 @@ #ifndef UI_BUFFER_H #define UI_BUFFER_H -#include "prof_config.h" +#include "config.h" #include "config/theme.h" #include diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c index 179e8a06..f7e5eebb 100644 --- a/src/ui/chatwin.c +++ b/src/ui/chatwin.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -47,7 +47,7 @@ #include "ui/window.h" #include "ui/titlebar.h" #include "plugins/plugins.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include "otr/otr.h" #endif @@ -85,7 +85,7 @@ chatwin_receipt_received(ProfChatWin *chatwin, const char *const id) win_mark_received(win, id); } -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR void chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted) { diff --git a/src/ui/console.c b/src/ui/console.c index dd1dc065..69984333 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -37,9 +37,9 @@ #include #include -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif @@ -57,7 +57,7 @@ #include "xmpp/xmpp.h" #include "xmpp/bookmark.h" -#ifdef PROF_HAVE_GIT_VERSION +#ifdef HAVE_GIT_VERSION #include "gitversion.h" #endif @@ -82,7 +82,7 @@ void cons_debug(const char *const msg, ...) { ProfWin *console = wins_get_console(); - if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) { + if (strcmp(PACKAGE_STATUS, "development") == 0) { va_list arg; va_start(arg, msg); GString *fmt_msg = g_string_new(NULL); @@ -416,18 +416,18 @@ cons_about(void) _cons_splash_logo(); } else { - if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) { -#ifdef PROF_HAVE_GIT_VERSION - win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev.%s.%s", PROF_PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION); + if (strcmp(PACKAGE_STATUS, "development") == 0) { +#ifdef HAVE_GIT_VERSION + win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev.%s.%s", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION); #else - win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev", PROF_PACKAGE_VERSION); + win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev", PACKAGE_VERSION); #endif } else { - win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %s", PROF_PACKAGE_VERSION); + win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %s", PACKAGE_VERSION); } } - win_vprint(console, '-', 0, NULL, 0, 0, "", "Copyright (C) 2012 - 2016 James Booth <%s>.", PROF_PACKAGE_BUGREPORT); + win_vprint(console, '-', 0, NULL, 0, 0, "", "Copyright (C) 2012 - 2016 James Booth <%s>.", PACKAGE_BUGREPORT); win_println(console, 0, "License GPLv3+: GNU GPL version 3 or later "); win_println(console, 0, ""); win_println(console, 0, "This is free software; you are free to change and redistribute it."); @@ -2305,14 +2305,14 @@ _cons_splash_logo(void) win_print(console, '-', 0, NULL, 0, THEME_SPLASH, "", "|_| (____/ "); win_print(console, '-', 0, NULL, 0, THEME_SPLASH, "", ""); - if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) { -#ifdef PROF_HAVE_GIT_VERSION - win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev.%s.%s", PROF_PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION); + if (strcmp(PACKAGE_STATUS, "development") == 0) { +#ifdef HAVE_GIT_VERSION + win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev.%s.%s", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION); #else - win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev", PROF_PACKAGE_VERSION); + win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev", PACKAGE_VERSION); #endif } else { - win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %s", PROF_PACKAGE_VERSION); + win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %s", PACKAGE_VERSION); } } diff --git a/src/ui/core.c b/src/ui/core.c index e57b1f6a..4d9b4445 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -32,9 +32,9 @@ * */ -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_GIT_VERSION +#ifdef HAVE_GIT_VERSION #include "gitversion.h" #endif @@ -44,13 +44,13 @@ #include #include -#ifdef PROF_HAVE_LIBXSS +#ifdef HAVE_LIBXSS #include #endif #include -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif @@ -64,7 +64,7 @@ #include "jid.h" #include "log.h" #include "muc.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include "otr/otr.h" #endif #include "ui/ui.h" @@ -81,7 +81,7 @@ static int inp_size; static gboolean perform_resize = FALSE; static GTimer *ui_idle_time; -#ifdef PROF_HAVE_LIBXSS +#ifdef HAVE_LIBXSS static Display *display; #endif @@ -105,7 +105,7 @@ ui_init(void) wins_init(); notifier_initialise(); cons_about(); -#ifdef PROF_HAVE_LIBXSS +#ifdef HAVE_LIBXSS display = XOpenDisplay(0); #endif ui_idle_time = g_timer_new(); @@ -150,7 +150,7 @@ unsigned long ui_get_idle_time(void) { // if compiled with libxss, get the x sessions idle time -#ifdef PROF_HAVE_LIBXSS +#ifdef HAVE_LIBXSS XScreenSaverInfo *info = XScreenSaverAllocInfo(); if (info && display) { XScreenSaverQueryInfo(display, DefaultRootWindow(display), info); @@ -497,7 +497,7 @@ ui_close_connected_win(int index) } else if (window->type == WIN_CHAT) { ProfChatWin *chatwin = (ProfChatWin*) window; assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK); -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR if (chatwin->is_otr) { otr_end_session(chatwin->barejid); } diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index a56d4c05..fc1c204d 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -33,7 +33,7 @@ */ #define _XOPEN_SOURCE_EXTENDED -#include "prof_config.h" +#include "config.h" #include #include @@ -46,9 +46,9 @@ #include #include -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif diff --git a/src/ui/notifier.c b/src/ui/notifier.c index ddcac0aa..80ede2dc 100644 --- a/src/ui/notifier.c +++ b/src/ui/notifier.c @@ -31,17 +31,17 @@ * source files in the program, then also delete it here. * */ -#include "prof_config.h" +#include "config.h" #include #include #include #include -#ifdef PROF_HAVE_LIBNOTIFY +#ifdef HAVE_LIBNOTIFY #include #endif -#ifdef PROF_PLATFORM_CYGWIN +#ifdef PLATFORM_CYGWIN #include #endif @@ -62,7 +62,7 @@ notifier_initialise(void) void notifier_uninit(void) { -#ifdef PROF_HAVE_LIBNOTIFY +#ifdef HAVE_LIBNOTIFY if (notify_is_initted()) { notify_uninit(); } @@ -196,7 +196,7 @@ notify_remind(void) void notify(const char *const message, int timeout, const char *const category) { -#ifdef PROF_HAVE_LIBNOTIFY +#ifdef HAVE_LIBNOTIFY log_debug("Attempting notification: %s", message); if (notify_is_initted()) { log_debug("Reinitialising libnotify"); @@ -227,7 +227,7 @@ notify(const char *const message, int timeout, const char *const category) log_error("Libnotify not initialised."); } #endif -#ifdef PROF_PLATFORM_CYGWIN +#ifdef PLATFORM_CYGWIN NOTIFYICONDATA nid; nid.cbSize = sizeof(NOTIFYICONDATA); //nid.hWnd = hWnd; @@ -248,7 +248,7 @@ notify(const char *const message, int timeout, const char *const category) Shell_NotifyIcon(NIM_MODIFY, &nid); #endif -#ifdef PROF_HAVE_OSXNOTIFY +#ifdef HAVE_OSXNOTIFY GString *notify_command = g_string_new("terminal-notifier -title \"Profanity\" -message '"); char *escaped_single = str_replace(message, "'", "'\\''"); diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index 2176e844..45997e28 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -32,15 +32,15 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include #include -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c index 6a00eeb9..2b50dbd7 100644 --- a/src/ui/titlebar.c +++ b/src/ui/titlebar.c @@ -36,7 +36,7 @@ #include #include -#include "prof_config.h" +#include "config.h" #include "common.h" #include "config/theme.h" diff --git a/src/ui/ui.h b/src/ui/ui.h index d5d741d6..ab42f4d1 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -35,12 +35,12 @@ #ifndef UI_UI_H #define UI_UI_H -#include "prof_config.h" +#include "config.h" #include "command/commands.h" #include "ui/win_types.h" #include "muc.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include "otr/otr.h" #endif @@ -135,7 +135,7 @@ void chatwin_outgoing_carbon(ProfChatWin *chatwin, const char *const message, pr void chatwin_contact_online(ProfChatWin *chatwin, Resource *resource, GDateTime *last_activity); void chatwin_contact_offline(ProfChatWin *chatwin, char *resource, char *status); char* chatwin_get_string(ProfChatWin *chatwin); -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR void chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted); void chatwin_otr_unsecured(ProfChatWin *chatwin); void chatwin_otr_trust(ProfChatWin *chatwin); diff --git a/src/ui/win_types.h b/src/ui/win_types.h index 783324b0..e241a852 100644 --- a/src/ui/win_types.h +++ b/src/ui/win_types.h @@ -35,13 +35,13 @@ #ifndef UI_WIN_TYPES_H #define UI_WIN_TYPES_H -#include "prof_config.h" +#include "config.h" #include #include -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif diff --git a/src/ui/window.c b/src/ui/window.c index f52ebc41..1d95d4cb 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -41,9 +41,9 @@ #include #include -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif diff --git a/src/ui/window.h b/src/ui/window.h index 3ce2244a..4923f4ec 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -35,7 +35,7 @@ #ifndef UI_WINDOW_H #define UI_WINDOW_H -#include "prof_config.h" +#include "config.h" #include @@ -46,9 +46,9 @@ #include "xmpp/xmpp.h" #include "chat_state.h" -#ifdef PROF_HAVE_NCURSESW_NCURSES_H +#ifdef HAVE_NCURSESW_NCURSES_H #include -#elif PROF_HAVE_NCURSES_H +#elif HAVE_NCURSES_H #include #endif diff --git a/src/window_list.c b/src/window_list.c index 9e4ede98..65285898 100644 --- a/src/window_list.c +++ b/src/window_list.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c index 65b265c5..a853062b 100644 --- a/src/xmpp/bookmark.c +++ b/src/xmpp/bookmark.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -40,10 +40,10 @@ #include #include -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c index 46df6e0e..db840246 100644 --- a/src/xmpp/capabilities.c +++ b/src/xmpp/capabilities.c @@ -32,9 +32,9 @@ * */ -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_GIT_VERSION +#ifdef HAVE_GIT_VERSION #include "gitversion.h" #endif @@ -44,10 +44,10 @@ #include #include -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif @@ -565,9 +565,9 @@ caps_create_query_response_stanza(xmpp_ctx_t *const ctx) xmpp_stanza_set_attribute(identity, "type", "console"); GString *name_str = g_string_new("Profanity "); - g_string_append(name_str, PROF_PACKAGE_VERSION); - if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) { -#ifdef PROF_HAVE_GIT_VERSION + g_string_append(name_str, PACKAGE_VERSION); + if (strcmp(PACKAGE_STATUS, "development") == 0) { +#ifdef HAVE_GIT_VERSION g_string_append(name_str, "dev."); g_string_append(name_str, PROF_GIT_BRANCH); g_string_append(name_str, "."); diff --git a/src/xmpp/capabilities.h b/src/xmpp/capabilities.h index 1c01ed4c..929e21dd 100644 --- a/src/xmpp/capabilities.h +++ b/src/xmpp/capabilities.h @@ -35,12 +35,12 @@ #ifndef XMPP_CAPABILITIES_H #define XMPP_CAPABILITIES_H -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 0959470a..e760a0b7 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -32,16 +32,16 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include #include -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif @@ -425,7 +425,7 @@ _connection_free_session_data(void) presence_clear_sub_requests(); } -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE static int _connection_certfail_cb(xmpp_tlscert_t *xmpptlscert, const char *const errormsg) { @@ -544,7 +544,7 @@ _jabber_connect(const char *const fulljid, const char *const passwd, const char xmpp_conn_set_flags(jabber_conn.conn, XMPP_CONN_FLAG_DISABLE_TLS); } -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE char *cert_path = prefs_get_string(PREF_TLS_CERTPATH); if (cert_path) { xmpp_conn_tlscert_path(jabber_conn.conn, cert_path); @@ -552,7 +552,7 @@ _jabber_connect(const char *const fulljid, const char *const passwd, const char prefs_free_string(cert_path); #endif -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE int connect_status = xmpp_connect_client( jabber_conn.conn, altdomain, diff --git a/src/xmpp/connection.h b/src/xmpp/connection.h index 857fc88b..9d15bc96 100644 --- a/src/xmpp/connection.h +++ b/src/xmpp/connection.h @@ -35,12 +35,12 @@ #ifndef XMPP_CONNECTION_H #define XMPP_CONNECTION_H -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/form.c b/src/xmpp/form.c index f6724160..41c76803 100644 --- a/src/xmpp/form.c +++ b/src/xmpp/form.c @@ -32,15 +32,15 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/form.h b/src/xmpp/form.h index 208143f6..8d0dac02 100644 --- a/src/xmpp/form.h +++ b/src/xmpp/form.h @@ -37,6 +37,13 @@ #include "xmpp/xmpp.h" +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE +#include +#endif + DataForm* form_create(xmpp_stanza_t *const stanza); xmpp_stanza_t* form_create_submission(DataForm *form); diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 67c8daaf..17f129b0 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -32,9 +32,9 @@ * */ -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_GIT_VERSION +#ifdef HAVE_GIT_VERSION #include "gitversion.h" #endif @@ -43,10 +43,10 @@ #include #include -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif @@ -1131,9 +1131,9 @@ _version_get_handler(xmpp_stanza_t *const stanza) xmpp_stanza_t *version = xmpp_stanza_new(ctx); xmpp_stanza_set_name(version, "version"); xmpp_stanza_t *version_txt = xmpp_stanza_new(ctx); - GString *version_str = g_string_new(PROF_PACKAGE_VERSION); - if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) { -#ifdef PROF_HAVE_GIT_VERSION + GString *version_str = g_string_new(PACKAGE_VERSION); + if (strcmp(PACKAGE_STATUS, "development") == 0) { +#ifdef HAVE_GIT_VERSION g_string_append(version_str, "dev."); g_string_append(version_str, PROF_GIT_BRANCH); g_string_append(version_str, "."); diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 5878a0d5..bdcceb5e 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -32,15 +32,15 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif @@ -198,7 +198,7 @@ message_send_chat_pgp(const char *const barejid, const char *const msg) char *id = create_unique_id("msg"); xmpp_stanza_t *message = NULL; -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME char *account_name = jabber_get_account_name(); ProfAccount *account = accounts_get_account(account_name); if (account->pgp_keyid) { diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index 888e936d..24d2729a 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -41,10 +41,10 @@ #include #include -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index 9605f611..05afdcd8 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -32,7 +32,7 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include @@ -40,10 +40,10 @@ #include -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c index dc4c3bbd..618c455f 100644 --- a/src/xmpp/stanza.c +++ b/src/xmpp/stanza.c @@ -32,17 +32,17 @@ * */ -#include "prof_config.h" +#include "config.h" #include #include #include -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/stanza.h b/src/xmpp/stanza.h index 1e375783..b4a51580 100644 --- a/src/xmpp/stanza.h +++ b/src/xmpp/stanza.h @@ -35,12 +35,12 @@ #ifndef XMPP_STANZA_H #define XMPP_STANZA_H -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 8a7d4850..9dcc1798 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -35,12 +35,12 @@ #ifndef XMPP_XMPP_H #define XMPP_XMPP_H -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE #include #endif -#ifdef PROF_HAVE_LIBSTROPHE +#ifdef HAVE_LIBSTROPHE #include #endif @@ -155,7 +155,7 @@ char* jabber_get_account_name(void); GList* jabber_get_available_resources(void); char* jabber_create_uuid(void); void jabber_free_uuid(char *uuid); -#ifdef PROF_HAVE_LIBMESODE +#ifdef HAVE_LIBMESODE TLSCertificate* jabber_get_tls_peer_cert(void); #endif gboolean jabber_conn_is_secured(void); diff --git a/tests/functionaltests/functionaltests.c b/tests/functionaltests/functionaltests.c index b79c2075..b6834290 100644 --- a/tests/functionaltests/functionaltests.c +++ b/tests/functionaltests/functionaltests.c @@ -7,7 +7,7 @@ #include #include -#include "prof_config.h" +#include "config.h" #include "proftest.h" #include "test_connect.h" diff --git a/tests/unittests/test_cmd_account.c b/tests/unittests/test_cmd_account.c index 6eecaac9..4b49867f 100644 --- a/tests/unittests/test_cmd_account.c +++ b/tests/unittests/test_cmd_account.c @@ -798,7 +798,7 @@ void cmd_account_set_priority_updates_presence_when_account_connected_with_prese will_return(jabber_get_account_name, "a_account"); -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME ProfAccount *account = account_new("a_account", "a_jid", NULL, NULL, TRUE, NULL, 5222, "a_resource", NULL, NULL, 10, 10, 10, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); diff --git a/tests/unittests/test_cmd_otr.c b/tests/unittests/test_cmd_otr.c index fbfa6cb2..fdadcb0e 100644 --- a/tests/unittests/test_cmd_otr.c +++ b/tests/unittests/test_cmd_otr.c @@ -6,9 +6,9 @@ #include #include -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include #include "otr/otr.h" #endif @@ -24,7 +24,7 @@ #define CMD_OTR "/otr" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR void cmd_otr_shows_usage_when_no_args(void **state) { gchar *args[] = { NULL }; diff --git a/tests/unittests/test_cmd_otr.h b/tests/unittests/test_cmd_otr.h index 06367041..469d7c54 100644 --- a/tests/unittests/test_cmd_otr.h +++ b/tests/unittests/test_cmd_otr.h @@ -1,6 +1,6 @@ -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR void cmd_otr_shows_usage_when_no_args(void **state); void cmd_otr_shows_usage_when_invalid_subcommand(void **state); void cmd_otr_log_shows_usage_when_no_args(void **state); diff --git a/tests/unittests/test_cmd_pgp.c b/tests/unittests/test_cmd_pgp.c index 79d617ae..b1d0ab52 100644 --- a/tests/unittests/test_cmd_pgp.c +++ b/tests/unittests/test_cmd_pgp.c @@ -6,7 +6,7 @@ #include #include -#include "prof_config.h" +#include "config.h" #include "command/commands.h" @@ -14,7 +14,7 @@ #define CMD_PGP "/pgp" -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME void cmd_pgp_shows_usage_when_no_args(void **state) { gchar *args[] = { NULL }; diff --git a/tests/unittests/test_cmd_pgp.h b/tests/unittests/test_cmd_pgp.h index e6f38192..fcb24500 100644 --- a/tests/unittests/test_cmd_pgp.h +++ b/tests/unittests/test_cmd_pgp.h @@ -1,6 +1,6 @@ -#include "prof_config.h" +#include "config.h" -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME void cmd_pgp_shows_usage_when_no_args(void **state); void cmd_pgp_start_shows_message_when_disconnected(void **state); void cmd_pgp_start_shows_message_when_disconnecting(void **state); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 6ebf5be5..4881d831 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -1,4 +1,4 @@ -#include "prof_config.h" +#include "config.h" #include #include @@ -8,7 +8,7 @@ #include "ui/window.h" #include "ui/ui.h" -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR #include "otr/otr.h" #endif @@ -67,7 +67,7 @@ void ui_resize(void) {} void ui_focus_win(ProfWin *win) {} -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR void chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted) {} void chatwin_otr_unsecured(ProfChatWin *chatwin) {} void chatwin_otr_trust(ProfChatWin *chatwin) {} diff --git a/tests/unittests/unittests.c b/tests/unittests/unittests.c index 61143ce0..6b26cb29 100644 --- a/tests/unittests/unittests.c +++ b/tests/unittests/unittests.c @@ -7,7 +7,7 @@ #include #include -#include "prof_config.h" +#include "config.h" #include "chat_session.h" #include "helpers.h" #include "test_autocomplete.h" @@ -355,7 +355,7 @@ int main(int argc, char* argv[]) { unit_test(cmd_account_set_eval_password_when_password_set), unit_test(cmd_account_set_muc_sets_muc), unit_test(cmd_account_set_nick_sets_nick), -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR unit_test(cmd_account_show_message_for_missing_otr_policy), unit_test(cmd_account_show_message_for_invalid_otr_policy), unit_test(cmd_account_set_otr_sets_otr), @@ -504,7 +504,7 @@ int main(int argc, char* argv[]) { unit_test(cmd_bookmark_remove_removes_bookmark), unit_test(cmd_bookmark_remove_shows_message_when_no_bookmark), -#ifdef PROF_HAVE_LIBOTR +#ifdef HAVE_LIBOTR unit_test(cmd_otr_shows_usage_when_no_args), unit_test(cmd_otr_shows_usage_when_invalid_subcommand), unit_test(cmd_otr_log_shows_usage_when_no_args), @@ -556,7 +556,7 @@ int main(int argc, char* argv[]) { unit_test(cmd_otr_shows_message_when_otr_unsupported), #endif -#ifdef PROF_HAVE_LIBGPGME +#ifdef HAVE_LIBGPGME unit_test(cmd_pgp_shows_usage_when_no_args), unit_test(cmd_pgp_start_shows_message_when_disconnected), unit_test(cmd_pgp_start_shows_message_when_disconnecting),