Mercurial > dwindows
annotate dwindows-config1.in @ 2873:0bbfb19022e7
C++: GCC prior to 4.7 does not support the override keyword.
So if using earlier versions of GCC, just remove override.
This allows compilation on ancient GCC and GCC based Xcode.
Also remove virtual from the application, I don't think it
is needed and old GCC pukes on it when it is there.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 19 Dec 2022 07:42:12 +0000 |
parents | c677d728e143 |
children |
rev | line source |
---|---|
1611
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1 #!/bin/sh |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
2 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
3 dw_libs="@LIBS@" |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
4 dw_cflags="@CFLAGS@ -D@DW_DEFINE@" |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
5 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
6 prefix=@prefix@ |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
7 exec_prefix=@exec_prefix@ |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
8 exec_prefix_set=no |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
9 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
10 usage() |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
11 { |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
12 cat <<EOF |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
13 Usage: dwindows-config [OPTIONS] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
14 Options: |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
15 [--prefix[=DIR]] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
16 [--exec-prefix[=DIR]] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
17 [--version] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
18 [--libs] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
19 [--cflags] |
2202
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
20 [--gresource] |
1611
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
21 EOF |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
22 exit $1 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
23 } |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
24 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
25 if test $# -eq 0; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
26 usage 1 1>&2 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
27 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
28 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
29 while test $# -gt 0; do |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
30 case "$1" in |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
31 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
32 *) optarg= ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
33 esac |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
34 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
35 case $1 in |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
36 --prefix=*) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
37 prefix=$optarg |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
38 if test $exec_prefix_set = no ; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
39 exec_prefix=$optarg |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
40 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
41 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
42 --prefix) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
43 echo_prefix=yes |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
44 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
45 --exec-prefix=*) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
46 exec_prefix=$optarg |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
47 exec_prefix_set=yes |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
48 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
49 --version) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
50 echo @DW_MAJOR_VERSION@.@DW_MINOR_VERSION@.@DW_SUB_VERSION@ |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
51 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
52 --cflags) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
53 echo_cflags=yes |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
54 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
55 --libs) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
56 echo_libs=yes |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
57 ;; |
2202
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
58 --gresource) |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
59 echo_gresource=yes |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
60 ;; |
1611
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
61 *) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
62 usage 1 1>&2 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
63 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
64 esac |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
65 shift |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
66 done |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
67 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
68 if test "$echo_prefix" = "yes"; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
69 echo $prefix |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
70 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
71 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
72 if test "$echo_exec_prefix" = "yes"; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
73 echo $exec_prefix |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
74 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
75 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
76 if test "$echo_cflags" = "yes"; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
77 echo -I${prefix}/include $dw_cflags |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
78 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
79 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
80 if test "$echo_libs" = "yes"; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
81 echo -L${prefix}/lib -ldwindows $dw_libs |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
82 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
83 |
2202
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
84 if test "$echo_gresource" = "yes"; then |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
85 echo @DW_GRESOURCE@ |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
86 fi |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
87 |