|
@@ -1,6 +1,6 @@
|
1
|
1
|
--- a/configure.ac
|
2
|
2
|
+++ b/configure.ac
|
3
|
|
-@@ -58,9 +58,6 @@
|
|
3
|
+@@ -58,9 +58,6 @@ AC_ARG_WITH([tools], [AS_HELP_STRING([--
|
4
|
4
|
[build_tools=$withval], [build_tools=yes])
|
5
|
5
|
|
6
|
6
|
AM_CONDITIONAL(BUILD_TOOLS, [test "x$build_tools" = "xyes" ])
|
|
@@ -20,7 +20,7 @@
|
20
|
20
|
#include <getopt.h>
|
21
|
21
|
|
22
|
22
|
#include "qrencode.h"
|
23
|
|
-@@ -49,7 +48,6 @@
|
|
23
|
+@@ -49,7 +48,6 @@ static unsigned int bg_color[4] = {255,
|
24
|
24
|
static int verbose = 0;
|
25
|
25
|
|
26
|
26
|
enum imageType {
|
|
@@ -28,7 +28,7 @@
|
28
|
28
|
EPS_TYPE,
|
29
|
29
|
SVG_TYPE,
|
30
|
30
|
ANSI_TYPE,
|
31
|
|
-@@ -60,7 +58,7 @@
|
|
31
|
+@@ -60,7 +58,7 @@ enum imageType {
|
32
|
32
|
ANSIUTF8_TYPE
|
33
|
33
|
};
|
34
|
34
|
|
|
@@ -37,7 +37,7 @@
|
37
|
37
|
|
38
|
38
|
static const struct option options[] = {
|
39
|
39
|
{"help" , no_argument , NULL, 'h'},
|
40
|
|
-@@ -96,13 +94,13 @@
|
|
40
|
+@@ -96,13 +94,13 @@ static void usage(int help, int longopt)
|
41
|
41
|
if(longopt) {
|
42
|
42
|
fprintf(stderr,
|
43
|
43
|
"Usage: qrencode [OPTION]... [STRING]\n"
|
|
@@ -53,7 +53,7 @@
|
53
|
53
|
" (suffix is removed from FILENAME, if specified)\n"
|
54
|
54
|
" -s NUMBER, --size=NUMBER\n"
|
55
|
55
|
" specify module size in dots (pixels). (default=3)\n\n"
|
56
|
|
-@@ -116,9 +114,9 @@
|
|
56
|
+@@ -116,9 +114,9 @@ static void usage(int help, int longopt)
|
57
|
57
|
" specify the width of the margins. (default=4 (2 for Micro QR)))\n\n"
|
58
|
58
|
" -d NUMBER, --dpi=NUMBER\n"
|
59
|
59
|
" specify the DPI of the generated PNG. (default=72)\n\n"
|
|
@@ -65,7 +65,7 @@
|
65
|
65
|
" -S, --structured\n"
|
66
|
66
|
" make structured symbols. Version must be specified.\n\n"
|
67
|
67
|
" -k, --kanji assume that the input text contains kanji (shift-jis).\n\n"
|
68
|
|
-@@ -133,7 +131,7 @@
|
|
68
|
+@@ -133,7 +131,7 @@ static void usage(int help, int longopt)
|
69
|
69
|
" --background=RRGGBB[AA]\n"
|
70
|
70
|
" specify foreground/background color in hexadecimal notation.\n"
|
71
|
71
|
" 6-digit (RGB) or 8-digit (RGBA) form are supported.\n"
|
|
@@ -74,7 +74,7 @@
|
74
|
74
|
" -V, --version\n"
|
75
|
75
|
" display the version number and copyrights of the qrencode.\n\n"
|
76
|
76
|
" --verbose\n"
|
77
|
|
-@@ -153,12 +151,12 @@
|
|
77
|
+@@ -153,12 +151,12 @@ static void usage(int help, int longopt)
|
78
|
78
|
} else {
|
79
|
79
|
fprintf(stderr,
|
80
|
80
|
"Usage: qrencode [OPTION]... [STRING]\n"
|
|
@@ -89,7 +89,7 @@
|
89
|
89
|
" (suffix is removed from FILENAME, if specified)\n"
|
90
|
90
|
" -s NUMBER specify module size in dots (pixels). (default=3)\n"
|
91
|
91
|
" -l {LMQH} specify error correction level from L (lowest) to H (highest).\n"
|
92
|
|
-@@ -166,8 +164,8 @@
|
|
92
|
+@@ -166,8 +164,8 @@ static void usage(int help, int longopt)
|
93
|
93
|
" -v NUMBER specify the version of the symbol. (default=auto)\n"
|
94
|
94
|
" -m NUMBER specify the width of the margins. (default=4 (2 for Micro))\n"
|
95
|
95
|
" -d NUMBER specify the DPI of the generated PNG. (default=72)\n"
|
|
@@ -100,7 +100,7 @@
|
100
|
100
|
" -S make structured symbols. Version must be specified.\n"
|
101
|
101
|
" -k assume that the input text contains kanji (shift-jis).\n"
|
102
|
102
|
" -c encode lower-case alphabet characters in 8-bit mode. (default)\n"
|
103
|
|
-@@ -178,7 +176,7 @@
|
|
103
|
+@@ -178,7 +176,7 @@ static void usage(int help, int longopt)
|
104
|
104
|
" --background=RRGGBB[AA]\n"
|
105
|
105
|
" specify foreground/background color in hexadecimal notation.\n"
|
106
|
106
|
" 6-digit (RGB) or 8-digit (RGBA) form are supported.\n"
|
|
@@ -109,7 +109,7 @@
|
109
|
109
|
" -V display the version number and copyrights of the qrencode.\n"
|
110
|
110
|
" [STRING] input data. If it is not specified, data will be taken from\n"
|
111
|
111
|
" standard input.\n"
|
112
|
|
-@@ -253,128 +251,6 @@
|
|
112
|
+@@ -253,128 +251,6 @@ static FILE *openFile(const char *outfil
|
113
|
113
|
return fp;
|
114
|
114
|
}
|
115
|
115
|
|
|
@@ -238,7 +238,7 @@
|
238
|
238
|
static int writeEPS(QRcode *qrcode, const char *outfile)
|
239
|
239
|
{
|
240
|
240
|
FILE *fp;
|
241
|
|
-@@ -831,9 +707,6 @@
|
|
241
|
+@@ -831,9 +707,6 @@ static void qrencode(const unsigned char
|
242
|
242
|
}
|
243
|
243
|
|
244
|
244
|
switch(image_type) {
|
|
@@ -248,7 +248,7 @@
|
248
|
248
|
case EPS_TYPE:
|
249
|
249
|
writeEPS(qrcode, outfile);
|
250
|
250
|
break;
|
251
|
|
-@@ -887,9 +760,6 @@
|
|
251
|
+@@ -887,9 +760,6 @@ static void qrencodeStructured(const uns
|
252
|
252
|
size_t suffix_size;
|
253
|
253
|
|
254
|
254
|
switch(image_type) {
|
|
@@ -258,7 +258,7 @@
|
258
|
258
|
case EPS_TYPE:
|
259
|
259
|
type_suffix = ".eps";
|
260
|
260
|
break;
|
261
|
|
-@@ -948,9 +818,6 @@
|
|
261
|
+@@ -948,9 +818,6 @@ static void qrencodeStructured(const uns
|
262
|
262
|
}
|
263
|
263
|
|
264
|
264
|
switch(image_type) {
|
|
@@ -268,7 +268,7 @@
|
268
|
268
|
case EPS_TYPE:
|
269
|
269
|
writeEPS(p->code, filename);
|
270
|
270
|
break;
|
271
|
|
-@@ -1062,9 +929,7 @@
|
|
271
|
+@@ -1062,9 +929,7 @@ int main(int argc, char **argv)
|
272
|
272
|
}
|
273
|
273
|
break;
|
274
|
274
|
case 't':
|
|
@@ -279,7 +279,7 @@
|
279
|
279
|
image_type = EPS_TYPE;
|
280
|
280
|
} else if(strcasecmp(optarg, "svg") == 0) {
|
281
|
281
|
image_type = SVG_TYPE;
|
282
|
|
-@@ -1133,11 +998,6 @@
|
|
282
|
+@@ -1133,11 +998,6 @@ int main(int argc, char **argv)
|
283
|
283
|
exit(EXIT_SUCCESS);
|
284
|
284
|
}
|
285
|
285
|
|
|
@@ -291,3 +291,106 @@
|
291
|
291
|
if(optind < argc) {
|
292
|
292
|
intext = (unsigned char *)argv[optind];
|
293
|
293
|
length = strlen((char *)intext);
|
|
294
|
+--- a/configure
|
|
295
|
++++ b/configure
|
|
296
|
+@@ -12646,100 +12646,6 @@ else
|
|
297
|
+ BUILD_TOOLS_FALSE=
|
|
298
|
+ fi
|
|
299
|
+
|
|
300
|
+-if test x$build_tools = xyes ; then
|
|
301
|
+-
|
|
302
|
+-pkg_failed=no
|
|
303
|
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for png" >&5
|
|
304
|
+-$as_echo_n "checking for png... " >&6; }
|
|
305
|
+-
|
|
306
|
+-if test -n "$png_CFLAGS"; then
|
|
307
|
+- pkg_cv_png_CFLAGS="$png_CFLAGS"
|
|
308
|
+- elif test -n "$PKG_CONFIG"; then
|
|
309
|
+- if test -n "$PKG_CONFIG" && \
|
|
310
|
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"libpng\"\""; } >&5
|
|
311
|
+- ($PKG_CONFIG --exists --print-errors ""libpng"") 2>&5
|
|
312
|
+- ac_status=$?
|
|
313
|
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
314
|
+- test $ac_status = 0; }; then
|
|
315
|
+- pkg_cv_png_CFLAGS=`$PKG_CONFIG --cflags ""libpng"" 2>/dev/null`
|
|
316
|
+- test "x$?" != "x0" && pkg_failed=yes
|
|
317
|
+-else
|
|
318
|
+- pkg_failed=yes
|
|
319
|
+-fi
|
|
320
|
+- else
|
|
321
|
+- pkg_failed=untried
|
|
322
|
+-fi
|
|
323
|
+-if test -n "$png_LIBS"; then
|
|
324
|
+- pkg_cv_png_LIBS="$png_LIBS"
|
|
325
|
+- elif test -n "$PKG_CONFIG"; then
|
|
326
|
+- if test -n "$PKG_CONFIG" && \
|
|
327
|
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"libpng\"\""; } >&5
|
|
328
|
+- ($PKG_CONFIG --exists --print-errors ""libpng"") 2>&5
|
|
329
|
+- ac_status=$?
|
|
330
|
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
331
|
+- test $ac_status = 0; }; then
|
|
332
|
+- pkg_cv_png_LIBS=`$PKG_CONFIG --libs ""libpng"" 2>/dev/null`
|
|
333
|
+- test "x$?" != "x0" && pkg_failed=yes
|
|
334
|
+-else
|
|
335
|
+- pkg_failed=yes
|
|
336
|
+-fi
|
|
337
|
+- else
|
|
338
|
+- pkg_failed=untried
|
|
339
|
+-fi
|
|
340
|
+-
|
|
341
|
+-
|
|
342
|
+-
|
|
343
|
+-if test $pkg_failed = yes; then
|
|
344
|
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
345
|
+-$as_echo "no" >&6; }
|
|
346
|
+-
|
|
347
|
+-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
|
348
|
+- _pkg_short_errors_supported=yes
|
|
349
|
+-else
|
|
350
|
+- _pkg_short_errors_supported=no
|
|
351
|
+-fi
|
|
352
|
+- if test $_pkg_short_errors_supported = yes; then
|
|
353
|
+- png_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs ""libpng"" 2>&1`
|
|
354
|
+- else
|
|
355
|
+- png_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs ""libpng"" 2>&1`
|
|
356
|
+- fi
|
|
357
|
+- # Put the nasty error message in config.log where it belongs
|
|
358
|
+- echo "$png_PKG_ERRORS" >&5
|
|
359
|
+-
|
|
360
|
+- as_fn_error $? "Package requirements (\"libpng\") were not met:
|
|
361
|
+-
|
|
362
|
+-$png_PKG_ERRORS
|
|
363
|
+-
|
|
364
|
+-Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
|
365
|
+-installed software in a non-standard prefix.
|
|
366
|
+-
|
|
367
|
+-Alternatively, you may set the environment variables png_CFLAGS
|
|
368
|
+-and png_LIBS to avoid the need to call pkg-config.
|
|
369
|
+-See the pkg-config man page for more details." "$LINENO" 5
|
|
370
|
+-elif test $pkg_failed = untried; then
|
|
371
|
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
372
|
+-$as_echo "no" >&6; }
|
|
373
|
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
|
374
|
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
|
375
|
+-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
|
|
376
|
+-is in your PATH or set the PKG_CONFIG environment variable to the full
|
|
377
|
+-path to pkg-config.
|
|
378
|
+-
|
|
379
|
+-Alternatively, you may set the environment variables png_CFLAGS
|
|
380
|
+-and png_LIBS to avoid the need to call pkg-config.
|
|
381
|
+-See the pkg-config man page for more details.
|
|
382
|
+-
|
|
383
|
+-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
|
|
384
|
+-See \`config.log' for more details" "$LINENO" 5; }
|
|
385
|
+-else
|
|
386
|
+- png_CFLAGS=$pkg_cv_png_CFLAGS
|
|
387
|
+- png_LIBS=$pkg_cv_png_LIBS
|
|
388
|
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
389
|
+-$as_echo "yes" >&6; }
|
|
390
|
+-
|
|
391
|
+-fi
|
|
392
|
+-fi
|
|
393
|
+-
|
|
394
|
+
|
|
395
|
+ # Check whether --with-tests was given.
|
|
396
|
+ if test "${with_tests+set}" = set; then :
|