comparison configure.in @ 2087:082d743f3214

Reorder configure so SOSUFFIX is only used after it is set per platform. Remove newly broken QNX/Photon support from configure. Mac: Attempt a new test for the UserNotifications framework.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 05 Jun 2020 06:00:17 +0000
parents 498bdd71a556
children 068681933258
comparison
equal deleted inserted replaced
2086:498bdd71a556 2087:082d743f3214
59 AC_ARG_WITH(deprecated, 59 AC_ARG_WITH(deprecated,
60 [ --with-deprecated specify this to build with deprecated functions], 60 [ --with-deprecated specify this to build with deprecated functions],
61 [with_deprecated=$withval], 61 [with_deprecated=$withval],
62 [with_deprecated=no], 62 [with_deprecated=no],
63 ) 63 )
64
65 dnl ---------------------- check for '--with-arch' switch -----------------
66 AC_ARG_WITH(arch,
67 [ --with-arch specify architecture: one of all, 32bit, 64bit, intel, ppc, ppc64, x86_64, i386],
68 [with_arch=$withval],
69 [with_arch=no],
70 )
71
72 AC_HEADER_STDC
73 AC_HEADER_DIRENT
74 AC_CHECK_HEADERS(unistd.h)
75 AC_CHECK_HEADERS(sys/stat.h)
76
77 AC_CHECK_FUNCS(pipe, AC_DEFINE(HAVE_PIPE,1,Determine whether we have the pipe function))
78 AC_CHECK_FUNCS(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF,1,Determine whether we have the vsnprintf function))
79
80 AC_CHECK_FUNCS(connect)
81 if test x"$ac_cv_func_connect" = x"no"; then
82 if test -z "$libsocket"; then
83 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket",)
84 fi
85
86 dnl this is for isc. need the nsl_s library as well.
87 if test -z "$libinet"; then
88 AC_CHECK_LIB(inet, socket, libnsl=1; LIBS="$LIBS -linet -lnsl_s",)
89 fi
90
91 if test -z "$libnsl"; then
92 AC_CHECK_LIB(nsl, gethostname, LIBS="$LIBS -lnsl",)
93 fi
94 fi
95
96 AC_CHECK_LIB(sun, getpwnam, LIBS="$LIBS -lsun",)
97 AC_CHECK_LIB(dgc, inet_addr, LIBS="$LIBS -ldgc",)
98 AC_CHECK_LIB(resolv, gethostbyname, LIBS="$LIBS -lresolv",)
99 AC_CHECK_LIB(m, atan2, LIBS="$LIBS -lm",)
100
101 build_gtk="yes"
102 check_pthreads="yes"
103 PLATLIBS=""
104 SONAME=""
105 PLATCCFLAGS="-g -O2 -fPIC -Wall"
106 ARFLAGS="cqs"
107
108 case "$target" in
109 *cygwin*)
110 ;;
111 *mingw32)
112 AC_DEFINE(DW_USE_GTK)
113 ;;
114 *linux*)
115 SONAME="-Wl,-soname,lib$TARGET.so.\$(DW_MAJOR_VERSION)"
116 ;;
117 *apple-darwin*)
118 case "$with_arch" in
119 no)
120 ARCH=""
121 ;;
122 all)
123 ARCH="-arch ppc -arch ppc64 -arch x86_64 -arch i386"
124 ;;
125 32bit)
126 ARCH="-arch ppc -arch i386"
127 ;;
128 64bit)
129 ARCH="-arch ppc64 -arch x86_64"
130 ;;
131 intel)
132 ARCH="-arch i386 -arch x86_64"
133 ;;
134 powerpc)
135 ARCH="-arch ppc -arch ppc64"
136 ;;
137 *)
138 ARCH="-arch $with_arch"
139 ;;
140 esac
141 SHAREDFLAG="-dynamiclib -flat_namespace -undefined suppress -headerpad_max_install_names"
142 SOSUFFIX=dylib
143 DW_DIR=mac
144 DW_SRC=dw.m
145 DW_DEFINE=__MAC__
146 LIBS="$LIBS -framework Cocoa -framework WebKit"
147 save_libs="$LIBS"
148 LIBS="$LIBS -framework UserNotifications"
149 AC_CHECK_FUNC(exit, , [LIBS="$save_libs"])
150 build_gtk="no"
151 ;;
152 *)
153 ;;
154 esac
64 155
65 dnl ---------------------- default targets to build ----------------- 156 dnl ---------------------- default targets to build -----------------
66 if test $with_dwcompat = yes; then 157 if test $with_dwcompat = yes; then
67 COMPAT_OBJECT="dwcompat.o" 158 COMPAT_OBJECT="dwcompat.o"
68 INSTALL_COMPAT="installdwcompat" 159 INSTALL_COMPAT="installdwcompat"
73 SYSCONF_LINK_TARGET_SHARED2="" 164 SYSCONF_LINK_TARGET_SHARED2=""
74 fi 165 fi
75 SYSCONF_LINK_TARGET_SHARED="lib$TARGET.$SOSUFFIX.\$(DW_MAJOR_VERSION).\$(DW_MINOR_VERSION)" 166 SYSCONF_LINK_TARGET_SHARED="lib$TARGET.$SOSUFFIX.\$(DW_MAJOR_VERSION).\$(DW_MINOR_VERSION)"
76 SYSCONF_LINK_TARGET_STATIC="lib$TARGET.a" 167 SYSCONF_LINK_TARGET_STATIC="lib$TARGET.a"
77 168
78 dnl ---------------------- check for '--with-arch' switch -----------------
79 AC_ARG_WITH(arch,
80 [ --with-arch specify architecture: one of all, 32bit, 64bit, intel, ppc, ppc64, x86_64, i386],
81 [with_arch=$withval],
82 [with_arch=no],
83 )
84
85 AC_HEADER_STDC
86 AC_HEADER_DIRENT
87 AC_CHECK_HEADERS(unistd.h)
88 AC_CHECK_HEADERS(sys/stat.h)
89
90 AC_CHECK_FUNCS(pipe, AC_DEFINE(HAVE_PIPE,1,Determine whether we have the pipe function))
91 AC_CHECK_FUNCS(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF,1,Determine whether we have the vsnprintf function))
92
93 AC_CHECK_FUNCS(connect)
94 if test x"$ac_cv_func_connect" = x"no"; then
95 if test -z "$libsocket"; then
96 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket",)
97 fi
98
99 dnl this is for isc. need the nsl_s library as well.
100 if test -z "$libinet"; then
101 AC_CHECK_LIB(inet, socket, libnsl=1; LIBS="$LIBS -linet -lnsl_s",)
102 fi
103
104 if test -z "$libnsl"; then
105 AC_CHECK_LIB(nsl, gethostname, LIBS="$LIBS -lnsl",)
106 fi
107 fi
108
109 AC_CHECK_LIB(sun, getpwnam, LIBS="$LIBS -lsun",)
110 AC_CHECK_LIB(dgc, inet_addr, LIBS="$LIBS -ldgc",)
111 AC_CHECK_LIB(resolv, gethostbyname, LIBS="$LIBS -lresolv",)
112 AC_CHECK_LIB(m, atan2, LIBS="$LIBS -lm",)
113
114 build_gtk="yes"
115 check_pthreads="yes"
116 TARGETS="$SYSCONF_LINK_TARGET_SHARED $SYSCONF_LINK_TARGET_SHARED2" 169 TARGETS="$SYSCONF_LINK_TARGET_SHARED $SYSCONF_LINK_TARGET_SHARED2"
117 PLATLIBS=""
118 SONAME=""
119 PLATCCFLAGS="-g -O2 -fPIC -Wall"
120 ARFLAGS="cqs"
121
122 case "$target" in
123 *cygwin*)
124 ;;
125 *mingw32)
126 AC_DEFINE(DW_USE_GTK)
127 ;;
128 *linux*)
129 SONAME="-Wl,-soname,lib$TARGET.so.\$(DW_MAJOR_VERSION)"
130 ;;
131 *nto-qnx*)
132 DW_DIR="photon"
133 DW_DEFINE=__PHOTON__
134 build_gtk="no"
135 ;;
136 *qnx*)
137 DW_DIR="photon"
138 DW_DEFINE=__PHOTON__
139 build_gtk="no"
140 check_pthreads="no"
141 LIBSUFFIX="lib"
142 LIBPREFIX=""
143 SYSCONF_LINK_TARGET_STATIC="$TARGET.lib"
144 TARGETS="$TARGET.lib"
145 PLATCCFLAGS=""
146 PLATLIBS="-lphoton_s -lphexlib3r"
147 ARFLAGS="r"
148 ;;
149 *apple-darwin*)
150 case "$with_arch" in
151 no)
152 ARCH=""
153 ;;
154 all)
155 ARCH="-arch ppc -arch ppc64 -arch x86_64 -arch i386"
156 ;;
157 32bit)
158 ARCH="-arch ppc -arch i386"
159 ;;
160 64bit)
161 ARCH="-arch ppc64 -arch x86_64"
162 ;;
163 intel)
164 ARCH="-arch i386 -arch x86_64"
165 ;;
166 powerpc)
167 ARCH="-arch ppc -arch ppc64"
168 ;;
169 *)
170 ARCH="-arch $with_arch"
171 ;;
172 esac
173 SHAREDFLAG="-dynamiclib -flat_namespace -undefined suppress -headerpad_max_install_names"
174 SOSUFFIX=dylib
175 DW_DIR=mac
176 DW_SRC=dw.m
177 DW_DEFINE=__MAC__
178 LIBS="$LIBS -framework Cocoa -framework WebKit"
179 OSVER=`uname -r | cut -d. -f1`
180 if test $OSVER -ge "18"; then
181 LIBS="$LIBS -framework UserNotifications"
182 fi
183 build_gtk="no"
184 ;;
185 *)
186 ;;
187 esac
188 170
189 if test $build_gtk = "yes"; then 171 if test $build_gtk = "yes"; then
190 AC_PATH_XTRA 172 AC_PATH_XTRA
191 LIBS="$LIBS $X_LIBS -lX11" 173 LIBS="$LIBS $X_LIBS -lX11"
192 AC_CHECK_PROG(PKG_CFG, pkg-config, pkg-config) 174 AC_CHECK_PROG(PKG_CFG, pkg-config, pkg-config)