]> Untitled Git - emu8051.git/commitdiff
Add option no-define to AM_INIT_AUTOMAKE
authorHugo Villeneuve <hugo@hugovil.com>
Mon, 7 Apr 2014 02:36:16 +0000 (22:36 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Mon, 7 Apr 2014 02:36:16 +0000 (22:36 -0400)
No need to define all variables on the compiler command line since
they are already defined in the config.h header file.

configure.ac
src/common/common.h
src/gtk/app-config.c
src/gtk/helpmenu.c
src/gtk/main.c

index 1b28736c7d7b19cd02228e0acae08ca7e0b883a2..16a28b4b9f3351ec9963f9a2ac9428244f0a9343 100644 (file)
@@ -7,7 +7,7 @@ AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_SRCDIR(src/common/cpu8051.c)
 
 dnl Checking if the NEWS file has been updated to reflect the current version.
-AM_INIT_AUTOMAKE(check-news -Wall std-options color-tests parallel-tests)
+AM_INIT_AUTOMAKE(no-define check-news -Wall std-options color-tests parallel-tests)
 AM_SILENT_RULES([yes])
 AM_CONFIG_HEADER(config.h:config-h.in)
 
index 345a21a2a41ffd55f47e392869cdb0071d882b38..e38f5b1b7ab6c20eca2e60ce809ec38842ea3c5a 100644 (file)
 #ifndef COMMON_H
 #define COMMON_H 1
 
+#if HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
index eccfc4d871a983ec7703af7cc264f17073906478..487975f325be6e5c7225c8684f5828e870d366f5 100644 (file)
@@ -103,7 +103,7 @@ app_config_get_dir_path(void)
 {
        char *dir_path;
 
-       dir_path = g_build_filename(g_get_user_config_dir(), PACKAGE,
+       dir_path = g_build_filename(g_get_user_config_dir(), PACKAGE_NAME,
                                    profile_name, NULL);
 
        return dir_path;
@@ -116,7 +116,7 @@ app_config_get_file_path(void)
        char *dir_path;
        char file[MAX_FILENAME_LENGTH];
 
-       sprintf(file, "%s.conf", PACKAGE);
+       sprintf(file, "%s.conf", PACKAGE_NAME);
 
        dir_path = app_config_get_dir_path();
 
index 9b9ac2eb94d2f73b7114188864a8378004d65a8d..90c9120fa9a8cc3d48e89b1310319b69e4e003cd 100644 (file)
@@ -82,7 +82,7 @@ help_add_menu(GtkWidget *menu_bar)
        menu = gtk_menu_new();
 
        /* Create the 'Help About' item. */
-       item = gtk_menu_item_new_with_label("About " PACKAGE);
+       item = gtk_menu_item_new_with_label("About " PACKAGE_NAME);
        gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
        /* Attach the callback functions to the activate signal. */
        g_signal_connect(item, "activate", G_CALLBACK(help_about_event), NULL);
index 94b7ebe7689a338e4884b2758e08ec56421016bd..d20d744f90a7de5c2fdef03df21b53d74cbab34a 100644 (file)
@@ -479,7 +479,7 @@ emugtk_window_init(void)
        emugtk_window_init_complete = false;
 
        mainwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-       gtk_window_set_title(GTK_WINDOW(mainwin), PACKAGE);
+       gtk_window_set_title(GTK_WINDOW(mainwin), PACKAGE_NAME);
        gtk_window_set_default_size(GTK_WINDOW(mainwin),
                                    cfg->win_width, cfg->win_height);
        gtk_container_set_border_width(GTK_CONTAINER(mainwin), 0);