Reflect addition of NLS libraries.
Showing
1 changed file
with
16 additions
and
9 deletions
... | @@ -95,8 +95,7 @@ main (int argc, char **argv) | ... | @@ -95,8 +95,7 @@ main (int argc, char **argv) |
95 | 95 | ||
96 | if (mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, &index, NULL)) | 96 | if (mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, &index, NULL)) |
97 | { | 97 | { |
98 | argp_help (&argp, stdout, ARGP_HELP_SEE, | 98 | argp_help (&argp, stdout, ARGP_HELP_SEE, program_invocation_short_name); |
99 | program_invocation_short_name); | ||
100 | return 1; | 99 | return 1; |
101 | } | 100 | } |
102 | 101 | ||
... | @@ -117,22 +116,26 @@ main (int argc, char **argv) | ... | @@ -117,22 +116,26 @@ main (int argc, char **argv) |
117 | } entry[4]; | 116 | } entry[4]; |
118 | 117 | ||
119 | entry[n].level = 1; | 118 | entry[n].level = 1; |
120 | asprintf (&entry[n].ptr, " %s -lmailbox", LINK_FLAGS); | 119 | asprintf (&entry[n].ptr, "%s -lmailbox", LINK_FLAGS); |
121 | n++; | 120 | n++; |
122 | 121 | #ifdef ENABLE_NLS | |
122 | entry[n].level = 10; | ||
123 | asprintf (&entry[n].ptr, "-lintl -liconv"); | ||
124 | n++; | ||
125 | #endif | ||
123 | for (; n < sizeof(entry)/sizeof(entry[0]) && argc > 0; | 126 | for (; n < sizeof(entry)/sizeof(entry[0]) && argc > 0; |
124 | argc--, argv++, n++) | 127 | argc--, argv++, n++) |
125 | { | 128 | { |
126 | if (strcmp (argv[0], "auth") == 0) | 129 | if (strcmp (argv[0], "auth") == 0) |
127 | { | 130 | { |
128 | entry[n].level = 2; | 131 | entry[n].level = 2; |
129 | asprintf (&entry[n].ptr, " -lmuauth %s", AUTHLIBS); | 132 | asprintf (&entry[n].ptr, "-lmuauth %s", AUTHLIBS); |
130 | } | 133 | } |
131 | #ifdef WITH_GUILE | 134 | #ifdef WITH_GUILE |
132 | else if (strcmp (argv[0], "guile") == 0) | 135 | else if (strcmp (argv[0], "guile") == 0) |
133 | { | 136 | { |
134 | entry[n].level = -1; | 137 | entry[n].level = -1; |
135 | asprintf (&entry[n].ptr, " -lmu_scm %s", GUILE_LIBS); | 138 | asprintf (&entry[n].ptr, "-lmu_scm %s", GUILE_LIBS); |
136 | } | 139 | } |
137 | #endif | 140 | #endif |
138 | else | 141 | else |
... | @@ -159,11 +162,15 @@ main (int argc, char **argv) | ... | @@ -159,11 +162,15 @@ main (int argc, char **argv) |
159 | 162 | ||
160 | } | 163 | } |
161 | 164 | ||
162 | for (j = 0; j < n; j++) | 165 | /* At least one entry is always present */ |
166 | printf ("%s", entry[0].ptr); | ||
167 | |||
168 | /* Print the rest of them separated by a space */ | ||
169 | for (j = 1; j < n; j++) | ||
163 | { | 170 | { |
164 | if (j > 0 && entry[j].level == entry[j-1].level) | 171 | if (entry[j].level == entry[j-1].level) |
165 | continue; | 172 | continue; |
166 | printf ("%s", entry[j].ptr); | 173 | printf (" %s", entry[j].ptr); |
167 | } | 174 | } |
168 | printf ("\n"); | 175 | printf ("\n"); |
169 | return 0; | 176 | return 0; | ... | ... |
-
Please register or sign in to post a comment