aclocal.m4

changeset 3
c1941114ca88
parent 1
d64aaa7d146f
child 7
751d770bb5e3
equal deleted inserted replaced
0:8e574b1d9e27 1:ea8cdc7286b9
1 ## 1 ##
2 ## OSSP asgui - Accounting system graphical user interface 2 ## OSSP asgui - Accounting system graphical user interface
3 ## Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 3 ## Copyright (c) 2002-2008 The OSSP Project (http://www.ossp.org/)
4 ## Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 4 ## Copyright (c) 2002-2008 Ralf S. Engelschall <rse@engelschall.com>
5 ## Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 5 ## Copyright (c) 2002-2008 Michael Schloh von Bennewitz <michael@schloh.com>
6 ## Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 6 ## Copyright (c) 2002-2008 Cable & Wireless Telecommunications Services GmbH
7 ## 7 ##
8 ## This file is part of OSSP GUI, a graphical user interface 8 ## This file is part of OSSP GUI, a graphical user interface
9 ## for OSSP which can be found at http://www.ossp.org/ 9 ## for OSSP which can be found at http://asgui.europalab.com/
10 ## 10 ##
11 ## Permission to use, copy, modify, and distribute this software for 11 ## Permission to use, copy, modify, and distribute this software for
12 ## any purpose with or without fee is hereby granted, provided that 12 ## any purpose with or without fee is hereby granted, provided that
13 ## the above copyright notice and this permission notice appear in all 13 ## the above copyright notice and this permission notice appear in all
14 ## copies. 14 ## copies.
311 else 311 else
312 AC_MSG_RESULT(not found) 312 AC_MSG_RESULT(not found)
313 AC_MSG_ERROR([Neither \$QTDIR nor --with-qt=[DIR] paths exist]) 313 AC_MSG_ERROR([Neither \$QTDIR nor --with-qt=[DIR] paths exist])
314 fi 314 fi
315 315
316 dnl ## Now search for libs and headers
317 changequote(, )dnl
318 for file in x `find $QTBASE/include -name "qapplication.h" -print`; do
319 test .$file = .x && continue
320 c_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
321 done
322
323 dnl ## Scan to find out which Qt library to link against
324 dnl ## FIXME Merge static and dynamic library search blocks
325 dnl ## FIXME Remove this qt-mt check and do --enable-threads instead
326 for file in x `find $QTBASE/lib -name "libqt.so" -print`; do
327 test .$file = .x && continue
328 l_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
329 lib=`echo $file | sed -e 's;^.*/\(.*\)$;\1;' -e 's;lib\(.*\)\.so;\1;'`
330 done
331
332 dnl ## If we have a multithreaded shared library, then it's better
333 for file in x `find $QTBASE/lib -name "libqt-mt.so" -print`; do
334 test .$file = .x && continue
335 l_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
336 lib=`echo $file | sed -e 's;^.*/\(.*\)$;\1;' -e 's;lib\(.*\)\.so;\1;'`
337 done
338
339 dnl ## If we have static libraries, then prefer to use those
340 for file in x `find $QTBASE/lib -name "libqt.a" -print`; do
341 test .$file = .x && continue
342 l_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
343 lib=`echo $file | sed -e 's;^.*/\(.*\)$;\1;' -e 's;lib\(.*\)\.a;\1;'`
344 done
345
346 dnl ## But the static multithreaded library is preferred above all
347 for file in x `find $QTBASE/lib -name "libqt-mt.a" -print`; do
348 test .$file = .x && continue
349 l_dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
350 lib=`echo $file | sed -e 's;^.*/\(.*\)$;\1;' -e 's;lib\(.*\)\.a;\1;'`
351 done
352 changequote([, ])dnl
353
354 dnl ## Append paths of libs and headers 316 dnl ## Append paths of libs and headers
355 if test ".$lib" != .; then 317 if test ".$lib" != .; then
356 LIBS="$LIBS -l$lib" 318 LIBS="$LIBS -l$lib"
357 fi 319 fi
358 LDFLAGS="$LDFLAGS -L$l_dir" 320 LDFLAGS="$LDFLAGS `$PKG_CONFIG --ldlags Qt3Support QtCore QtGui`"
359 CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT" 321 CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT"
360 CXXCPP="$CXXCPP -DQT_THREAD_SUPPORT" 322 CXXCPP="$CXXCPP -DQT_THREAD_SUPPORT"
361 CXXFLAGS="$CXXFLAGS -I$c_dir" 323 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG --cflags-only-I Qt3Support QtCore QtGui`"
362 ]) 324 ])
363 325
364 326
365 dnl ## 327 dnl ##
366 dnl ## UIC check, should come after the Qt check 328 dnl ## UIC check, should come after the Qt check

mercurial