-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathconfigure.ac
1907 lines (1750 loc) · 68 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([openastro], [1.9.0], [[email protected]])
AC_CONFIG_SRCDIR([liboademosaic/oademosaic.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_MAINTAINER_MODE([disable])
AM_SILENT_RULES([yes])
AC_DISABLE_SHARED
# Checks for programs.
PKG_PROG_PKG_CONFIG
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_ARG_VAR(MOC,Path to moc executable)
AC_ARG_VAR(UIC,Path to uic executable)
AC_ARG_VAR(RCC,Path to rcc executable)
AC_ARG_VAR(LCONVERT,Path to lconvert executable)
AC_CHECK_PROGS(MOC, [moc moc-qt5 moc-qt4])
AC_CHECK_PROGS(UIC, [uic uic-qt5 uic-qt4])
AC_CHECK_PROGS(RCC, [rcc rcc-qt5])
AC_CHECK_PROGS(LCONVERT, [lconvert lconvert-qt5])
if test -z "$MOC" || test -z "$UIC" || test -z "$RCC" || test -z "$LCONVERT"
then
AC_MSG_ERROR([Qt utility programs moc, uic, rcc and lconvert are required.])
fi
AC_ARG_VAR(PYLON_CONFIG,Path to pylon-config executable)
AC_PATH_PROG(PYLON_CONFIG,[pylon-config],,[$PATH:/opt/pylon/bin])
AC_ARG_VAR(ARAVIS_INC,Path to Aravis include files)
armelavailable=yes
case $host in
*-apple-*|i?86-*-*|x86_64-*-*|armv[78]l-*-*|aarch64-*-*)
;;
armv[56]l-*-*)
armelavailable=no
;;
esac
have_v4l2=no
have_udev=no
have_ftdi1=no
have_flycapture2=no
have_spinnaker=no
have_dl=no
have_toupcam=$armelavailable
have_mallincam=$armelavailable
have_bressercam=$armelavailable
have_ogmacam=$armelavailable
have_tscam=$armelavailable
have_altaircam=$armelavailable
have_altaircamlegacy=$armelavailable
have_starshootg=$armelavailable
have_nncam=$armelavailable
have_omegonprocam=$armelavailable
#have_meadecam=$armelavailable
have_meadecam=no
have_qhyccd=$armelavailable
have_libavformat=no
have_libavutil=no
have_libavcodec=no
internal_uvc=no
have_libgphoto2=no
have_svbcamerasdk=no
have_libaravis=no
checkQtForPIC=no
checkSystemFFMPEG=yes
checkSystemLibusb=yes
checkSystemDC1394=yes
checkSystemLibuvc=no
checkSystemLibhidapi=yes
checkSystemLibasicamera=no
checkSystemLibefwfilter=no
checkSystemLibtoupcam=no
checkSystemLibaltaircam=no
checkSystemLibaltaircamlegacy=no
checkSystemLibstarshootg=no
checkSystemLibnncam=no
checkSystemLibmallincam=no
checkSystemLibbressercam=no
checkSystemLibogmacam=no
checkSystemLibtscam=no
checkSystemLibomegonprocam=no
checkSystemLibmeadecam=no
checkSystemLibqhyccd=no
checkSystemLibsvbcamerasdk=no
useisystemInclude=no
build_libusb=no
zwoSupportedArch=yes
case $host in
*-linux-*)
checkQtForPIC=yes
checkSystemDC1394=yes
checkSystemLibuvc=yes
checkSystemLibasicamera=yes
checkSystemLibefwfilter=yes
checkSystemLibtoupcam=$armelavailable
checkSystemLibqhyccd=$armelavailable
checkSystemLibaltaircam=$armelavailable
checkSystemLibaltaircamlegacy=$armelavailable
checkSystemLibmallincam=$armelavailable
checkSystemLibbressercam=$armelavailable
checkSystemLibogmacam=$armelavailable
checkSystemLibtscam=$armelavailable
checkSystemLibstarshootg=$armelavailable
checkSystemLibnncam=$armelavailable
checkSystemLibomegonprocam=$armelavailable
#checkSystemLibmeadecam=$armelavailable
checkSystemLibmeadecam=no
checkSystemLibsvbcamerasdk=yes
;;
*-apple-*)
useisystemInclude=yes
build_libusb=yes
have_svbcamerasdk=yes
;;
esac
# Retrieve Qt compilation and linker flags
have_qt5=no
qtver=`$MOC -v 2>&1 | sed 's/^.* \(.*\..*\)\..*$/\1/'`
qt_maj=`echo "$qtver" | cut -f1 -d.`
qt_min=`echo "$qtver" | cut -f2 -d.`
if test "$qt_maj" -eq 5
then
have_qt5=yes
fi
if test "$have_qt5" == "yes"
then
PKG_CHECK_MODULES(QT5, [Qt5Core, Qt5Gui, Qt5Widgets], [], [
AC_MSG_ERROR([Qt5 libraries are required.])])
AC_MSG_NOTICE([Building using Qt5])
if test "$checkQtForPIC" == "yes"; then
$PKG_CONFIG --variable=qt_config Qt5Core | grep -q reduce_relocations
red_rel=$?
if test $red_rel -eq 0; then
CXXFLAGS="-fPIC $CXXFLAGS"
AC_MSG_NOTICE([Qt5 appears to require compilation with -fPIC])
fi
fi
flags=`$PKG_CONFIG --cflags-only-I Qt5Core Qt5Gui Qt5Widgets`
MOC_CFLAGS="$flags"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/-I/-isystem/g'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L Qt5Core Qt5Gui Qt5Widgets` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l Qt5Core Qt5Gui Qt5Widgets` $LIBS"
AC_DEFINE([HAVE_QT5],[1],[Have Qt5])
else
PKG_CHECK_MODULES(QT, [QtCore, QtGui, QtNetwork], [], [
AC_MSG_ERROR([Qt libraries are required.])])
if ! `$PKG_CONFIG --exists 'QtCore >= 4.8.0'`; then
AC_MSG_ERROR([Qt >= 4.8.0 is required.])
fi
AC_MSG_NOTICE([Building using Qt4])
flags=`$PKG_CONFIG --cflags-only-I QtCore QtGui QtNetwork`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/-I/-isystem/g'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L QtCore QtGui QtNetwork` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l QtCore QtGui QtNetwork` $LIBS"
AC_DEFINE([HAVE_QT4],[1],[Have Qt4])
fi
# Checks for libraries.
case $host in
x86_64-apple-*)
CPPFLAGS="-isystem/opt/local/include $CPPFLAGS"
LDFLAGS="-L/opt/local/lib $LDFLAGS"
;;
i?86-apple-*)
CPPFLAGS="-isystem/opt/local/include $CPPFLAGS"
LDFLAGS="-L/opt/local/lib $LDFLAGS"
;;
esac
if `$PKG_CONFIG --exists libv4l2`; then
flags=`$PKG_CONFIG --cflags-only-I libv4l2`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L libv4l2` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l libv4l2` $LIBS"
have_v4l2=yes
AC_DEFINE([HAVE_LIBV4L2],[1],[Have V4L2 library])
AC_MSG_NOTICE([Using system libv4l2 library])
else
AC_CHECK_LIB([v4l2],[v4l2_open],[
LIBS="-lv4l2 $LIBS"
AC_DEFINE([HAVE_LIBV4L2],[1],[Have V4L2 library])
have_v4l2=yes
],[
AC_MSG_WARN([No V4L2 library found. V4L2 cameras will not be supported])])
fi
if `$PKG_CONFIG --exists libtiff-4`; then
flags=`$PKG_CONFIG --cflags-only-I libtiff-4`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L libtiff-4` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l libtiff-4` $LIBS"
AC_DEFINE([HAVE_LIBTIFF],[1],[Have libtiff])
AC_MSG_NOTICE([Using system libtiff library])
else
AC_CHECK_LIB([tiff],[TIFFOpen],[],[
AC_MSG_ERROR([libtiff is required])])
fi
if `$PKG_CONFIG --exists libpng`; then
flags=`$PKG_CONFIG --cflags-only-I libpng`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L libpng` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l libpng` $LIBS"
AC_DEFINE([HAVE_LIBPNG],[1],[Have libpng])
AC_MSG_NOTICE([Using system libpng library])
else
AC_CHECK_LIB([png],[png_sig_cmp],[],[
AC_MSG_ERROR([libpng is required])])
fi
if `$PKG_CONFIG --exists libjpeg`; then
flags=`$PKG_CONFIG --cflags-only-I libjpeg`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L libjpeg` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l libjpeg` $LIBS"
AC_DEFINE([HAVE_LIBJPG],[1],[Have libjpeg])
AC_MSG_NOTICE([Using system libjpeg library])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <stdio.h>
#include <stdlib.h>
#include <jpeglib.h>
extern void jpeg_mem_src (j_decompress_ptr, const unsigned char *, unsigned long );
int main()
{
struct jpeg_decompress_struct cinfo;
void *frame = 0;
jpeg_create_decompress ( &cinfo );
jpeg_mem_src ( &cinfo, ( const unsigned char* ) frame, 10 );
}])],
[AC_DEFINE([JPEG_MEM_SRC_USES_CONST],[1],[jpeg_mem_src uses const])],[])
else
AC_CHECK_LIB([jpeg],[jpeg_create_decompress],[],[
AC_MSG_ERROR([libjpeg is required])])
fi
if `$PKG_CONFIG --exists libraw`; then
flags=`$PKG_CONFIG --cflags-only-I libraw`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L libraw` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l libraw` $LIBS"
AC_DEFINE([HAVE_LIBRAW],[1],[Have libraw])
AC_MSG_NOTICE([Using system libraw library])
else
AC_CHECK_LIB([raw],[libraw_open_buffer],[],[
AC_MSG_ERROR([libraw is required])])
fi
if `$PKG_CONFIG --exists cfitsio`; then
flags=`$PKG_CONFIG --cflags-only-I cfitsio`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L cfitsio` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l cfitsio` $LIBS"
AC_DEFINE([HAVE_LIBCFITSIO],[1],[Have CFITSIO library])
else
AC_CHECK_LIB([cfitsio],[ffopen],[
LIBS="-lcfitsio $LIBS"
AC_DEFINE([HAVE_LIBCFITSIO],[1],[Have CFITSIO library])
],[
AC_MSG_ERROR([libcfitsio3 is required])])
fi
if `$PKG_CONFIG --exists libbz2`; then
flags=`$PKG_CONFIG --cflags-only-I libbz2`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L libbz2` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l libbz2` $LIBS"
have_bz2=yes
AC_DEFINE([HAVE_LIBBZ2],[1],[Have libbz2])
AC_MSG_NOTICE([Using system libbz2 library])
else
AC_CHECK_LIB([bz2],[BZ2_bzDecompress],[],[
AC_MSG_WARN([No bz2 library found])])
fi
if `$PKG_CONFIG --exists zlib`; then
flags=`$PKG_CONFIG --cflags-only-I zlib`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L zlib` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l zlib` $LIBS"
have_zlib=yes
AC_DEFINE([HAVE_LIBZ],[1],[Have libz])
AC_MSG_NOTICE([Using system libz library])
else
AC_CHECK_LIB([z],[uncompress],[],[
AC_MSG_ERROR([libz is required])])
fi
if `$PKG_CONFIG --exists liblzma`; then
flags=`$PKG_CONFIG --cflags-only-I liblzma`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
CPPFLAGS="$flags $CPPFLAGS"
LDFLAGS="`$PKG_CONFIG --libs-only-L liblzma` $LDFLAGS"
LIBS="`$PKG_CONFIG --libs-only-l liblzma` $LIBS"
have_lzma=yes
AC_DEFINE([HAVE_LIBLZMA],[1],[Have liblzma])
AC_MSG_NOTICE([Using system liblzma library])
else
AC_CHECK_LIB([lzma],[lzma_code],[],[
AC_MSG_ERROR([liblzma is required])])
fi
# sort out all the ffmpeg stuff
FFM_CPPFLAGS=''
FFM_LDFLAGS=''
FFM_LIBS=''
use_system_ffmpeg=no
if test "$checkSystemFFMPEG" == "yes"
then
# Some things can make you quite sweary, like people changing the names
# of packages between releases. Grrr!
# First we check for packages without the "-ffmpeg" extension
if `$PKG_CONFIG --exists 'libavcodec >= 57.0.0'`; then
flags=`$PKG_CONFIG --cflags-only-I libavcodec`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
FFM_CPPFLAGS="$flags $FFM_CPPFLAGS"
FFM_LDFLAGS="`$PKG_CONFIG --libs-only-L libavcodec` $FFM_LDFLAGS"
FFM_LIBS="`$PKG_CONFIG --libs-only-l libavcodec` $FFM_LIBS"
have_libavcodec=yes
fi
if `$PKG_CONFIG --exists 'libavformat >= 57.0.0'`; then
flags=`$PKG_CONFIG --cflags-only-I libavformat`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if `$PKG_CONFIG --exists 'libavformat < 58.0.0'`; then
flags="$flags -DFFMPEGV3"
fi
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
FFM_CPPFLAGS="$flags $FFM_CPPFLAGS"
FFM_LDFLAGS="`$PKG_CONFIG --libs-only-L libavformat` $FFM_LDFLAGS"
FFM_LIBS="`$PKG_CONFIG --libs-only-l libavformat` $FFM_LIBS"
have_libavformat=yes
fi
if `$PKG_CONFIG --exists 'libavutil >= 54.20.100'`; then
flags=`$PKG_CONFIG --cflags-only-I libavutil`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
FFM_CPPFLAGS="$flags $FFM_CPPFLAGS"
FFM_LDFLAGS="`$PKG_CONFIG --libs-only-L libavutil` $FFM_LDFLAGS"
FFM_LIBS="`$PKG_CONFIG --libs-only-l libavutil` $FFM_LIBS"
have_libavutil=yes
fi
if test "$have_libavcodec$have_libavformat$have_libavutil" != "yesyesyes"
then
if `$PKG_CONFIG --exists 'libavcodec-ffmpeg >= 57.0.0'`; then
flags=`$PKG_CONFIG --cflags-only-I libavcodec-ffmpeg`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
FFM_CPPFLAGS="$flags $FFM_CPPFLAGS"
FFM_LDFLAGS="`$PKG_CONFIG --libs-only-L libavcodec-ffmpeg` $FFM_LDFLAGS"
FFM_LIBS="`$PKG_CONFIG --libs-only-l libavcodec-ffmpeg` $FFM_LIBS"
have_libavcodec=yes
else
AC_MSG_WARN([No suitable version of system libavcodec found.])
fi
if `$PKG_CONFIG --exists 'libavformat-ffmpeg >= 57.0.0'`; then
flags=`$PKG_CONFIG --cflags-only-I libavformat-ffmpeg`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
FFM_CPPFLAGS="$flags $FFM_CPPFLAGS"
FFM_LDFLAGS="`$PKG_CONFIG --libs-only-L libavformat-ffmpeg` $FFM_LDFLAGS"
FFM_LIBS="`$PKG_CONFIG --libs-only-l libavformat-ffmpeg` $FFM_LIBS"
have_libavformat=yes
else
AC_MSG_WARN([No suitable version of system libavformat found.])
fi
if `$PKG_CONFIG --exists 'libavutil-ffmpeg >= 54.20.100'`; then
flags=`$PKG_CONFIG --cflags-only-I libavutil-ffmpeg`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
FFM_CPPFLAGS="$flags $FFM_CPPFLAGS"
FFM_LDFLAGS="`$PKG_CONFIG --libs-only-L libavutil-ffmpeg` $FFM_LDFLAGS"
FFM_LIBS="`$PKG_CONFIG --libs-only-l libavutil-ffmpeg` $FFM_LIBS"
have_libavutil=yes
else
AC_MSG_WARN([No suitable version of system libavutil found.])
fi
fi
if test "$have_libavcodec$have_libavformat$have_libavutil" == "yesyesyes"
then
FFMPEG_CFLAGS="$FFM_CPPFLAGS"
FFMPEG_LIBS="$FFM_LIBS"
FFMPEG_DIRS=""
use_system_ffmpeg=yes
AC_MSG_NOTICE([Using system FFmpeg libraries])
fi
fi
if test $use_system_ffmpeg = "no"
then
AC_DEFINE([INTERNAL_FFMPEG],[1],[Using internal FFmpeg libraries])
AC_DEFINE([FFMPEGV3],[1],[FFmpeg is V3])
fi
use_system_libusb=no
if test "$checkSystemLibusb" == "yes"
then
if `$PKG_CONFIG --exists 'libusb-1.0 >= 1.0.21'`; then
flags=`$PKG_CONFIG --cflags-only-I libusb-1.0`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBUSB_CFLAGS="$flags"
LIBUSB_CFLAGS_SUBDIR="$flags"
LIBUSB_LDFLAGS="`$PKG_CONFIG --libs-only-L libusb-1.0`"
LIBUSB_LIBS="`$PKG_CONFIG --libs-only-l libusb-1.0`"
use_system_libusb=yes
AC_DEFINE([HAVE_LIBUSB],[1],[Have libusb-1.0 library])
AC_MSG_NOTICE([Using system libusb-1.0 library])
else
# commented out because we can't be sure of the version
# AC_CHECK_LIB([usb],[libusb_init],[
# LIBS="-lusb-1.0 $LIBS"
# AC_DEFINE([HAVE_LIBUSB],[1],[Have libusb-1.0 library])
# ],[
AC_MSG_WARN([No suitable version of system libusb library found. Using internal version.])
# ])
build_libusb=yes
fi
else
# we'll always have this, because we use a local copy
AC_DEFINE([HAVE_LIBUSB],[1],[Have libusb-1.0 library])
fi
use_system_dc1394=no
if test "$checkSystemDC1394" == "yes"
then
if `$PKG_CONFIG --exists 'libdc1394-2 >= 2.2.4'`; then
AC_MSG_NOTICE([Using system libdc1394 library])
flags=`$PKG_CONFIG --cflags-only-I libdc1394-2`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBDC1394_CFLAGS="$flags"
# can't use shared dc1394 if we're not using the system libusb because
# it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
# LIBDC1394_LDFLAGS="`$PKG_CONFIG --libs-only-L libdc1394-2`"
# LIBDC1394_LIBS="`$PKG_CONFIG --libs-only-l libdc1394-2`"
:
use_system_dc1394=yes
else
AC_MSG_NOTICE([Using static libdc1394 to avoid system libusb])
LIBDC1394_LDFLAGS=""
mylibdir="`$PKG_CONFIG --variable=libdir libdc1394-2`"
AC_DEFINE([HAVE_STATIC_LIBDC1394],[1],[Using static libdc1394])
LIBDC1394_LIBS="$mylibdir/libdc1394.a $mylibdir/libraw1394.a"
fi
AC_DEFINE([HAVE_LIBDC1394],[1],[Have dc1394 library])
else
# commented out because we can't be sure of the version
# AC_CHECK_LIB([dc1394],[dc1394_new],[
# LIBS="-ldc1394 $LIBS"
# AC_DEFINE([HAVE_LIBDC1394],[1],[Have dc1394 library])
# ],[
AC_MSG_WARN([No suitable version of system dc1394 library found. Using internal version.])
# ])
fi
fi
use_system_libuvc=no
if test "$checkSystemLibuvc" == "yes"
then
if `$PKG_CONFIG --exists 'libuvc >= 0.0.5'`; then
AC_MSG_NOTICE([Using system libuvc library for build])
flags=`$PKG_CONFIG --cflags-only-I libuvc`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBUVC_CFLAGS="$flags"
# can't use shared libuvc if we're not using the system libusb because
# it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
# skipping this because libuvc is now dynamically loaded
# LIBUVC_LDFLAGS="`$PKG_CONFIG --libs-only-L libuvc`"
# LIBUVC_LIBS="`$PKG_CONFIG --libs-only-l libuvc`"
:
else
AC_MSG_NOTICE([Using static libuvc to avoid system libusb])
LIBUVC_LDFLAGS=""
mylibdir="`$PKG_CONFIG --variable=libdir libuvc`"
AC_DEFINE([HAVE_STATIC_LIBUVC],[1],[Using static libuvc])
LIBUVC_LIBS="$mylibdir/libuvc.a"
fi
use_system_libuvc=yes
AC_DEFINE([HAVE_LIBUVC],[1],[Have libuvc library])
else
# commented out because we can't be sure of the version
# AC_CHECK_LIB([uvc],[uvc_init],[
# LIBS="-luvc $LIBS"
# AC_DEFINE([HAVE_LIBUVC],[1],[Have libuvc library])
# ],[
AC_MSG_WARN([No suitable version of system libuvc library found. Using internal version.])
AC_DEFINE([HAVE_LIBUVC],[1],[Have libuvc library])
AC_DEFINE([HAVE_STATIC_LIBUVC],[1],[Using static libuvc])
# ])
fi
else
# we'll always have this, because we use a local copy
AC_DEFINE([HAVE_LIBUVC],[1],[Have libuvc library])
AC_DEFINE([HAVE_STATIC_LIBUVC],[1],[Using static libuvc])
fi
use_system_libhidapi=no
if test "$checkSystemLibhidapi" == "yes"
then
if `$PKG_CONFIG --exists 'hidapi-libusb >= 0.8.0'`; then
AC_MSG_NOTICE([Using system libhidapi-libusb library])
flags=`$PKG_CONFIG --cflags-only-I hidapi-libusb`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBHIDAPI_CFLAGS="$flags"
# can't use shared hidapi-libusb if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBHIDAPI_LDFLAGS="`$PKG_CONFIG --libs-only-L hidapi-libusb`"
LIBHIDAPI_LIBS="`$PKG_CONFIG --libs-only-l hidapi-libusb`"
else
AC_MSG_NOTICE([Using static hidapi-libusb to avoid system libusb])
LIBHIDAPI_LDFLAGS=""
mylibdir="`$PKG_CONFIG --variable=libdir hidapi-libusb`"
LIBHIDAPI_LIBS="$mylibdir/libhidapi-libusb.a"
fi
use_system_libhidapi=yes
AC_DEFINE([HAVE_LIBHIDAPI],[1],[Have libhidapi-libusb library])
else
AC_CHECK_LIB([hidapi-libusb],[hid_open],[
LIBS="-lhidapi-libusb $LIBS"
AC_DEFINE([HAVE_LIBHIDAPI],[1],[Have libhidapi-libusb library])
use_system_libhidapi=yes
],[
AC_CHECK_LIB([hidapi],[hid_open],[
LIBS="-lhidapi $LIBS"
AC_DEFINE([HAVE_LIBHIDAPI],[1],[Have libhidapilibrary])
use_system_libhidapi=yes
],[
AC_MSG_WARN([No suitable version of system libhidapi library found. Using internal version.])
])
])
fi
else
# we'll always have this, because we use a local copy
AC_DEFINE([HAVE_LIBHIDAPI],[1],[Have libhidapi library])
fi
if `$PKG_CONFIG --exists libftdi1`; then
flags=`$PKG_CONFIG --cflags-only-I libftdi1`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBFTDI_CFLAGS="$flags"
# can't use shared libftdi1 if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBFTDI_LDFLAGS="`$PKG_CONFIG --libs-only-L libftdi1`"
LIBFTDI_LIBS="`$PKG_CONFIG --libs-only-l libftdi1`"
else
AC_MSG_NOTICE([Using static libftdi1 to avoid system libusb])
LIBFTDI_LDFLAGS=""
mylibdir="`$PKG_CONFIG --variable=libdir libftdi1`"
LIBFTDI_LIBS="$mylibdir/libftdi1.a"
fi
have_ftdi1=yes
AC_DEFINE([HAVE_LIBFTDI],[1],[Have ftdi1 library])
else
if test "x$use_system_libusb" == "xyes"; then
AC_CHECK_LIB([ftdi1],[ftdi_new],[
LIBFTDI_LIBS="-lftdi1"
AC_DEFINE([HAVE_LIBFTDI],[1],[Have ftdi1 library])
have_ftdi1=yes
],[
AC_CHECK_LIB([ftdi],[ftdi_new],[
LIBFTDI_LIBS="-lftdi"
AC_DEFINE([HAVE_LIBFTDI],[1],[Have ftdi1 library])
have_ftdi1=yes
],[
AC_MSG_WARN([No ftdi1 library found. Xagyl filter wheels can not be supported using libftdi1])])])
else
AC_MSG_WARN([No ftdi1 library found. Xagyl filter wheels can not be supported using libftdi1])
fi
fi
if test "x$have_ftdi1" == "xyes"
then
AC_CHECK_LIB([ftdi],[ftdi_tcioflush],[
AC_DEFINE([HAVE_FTDI_TCIOFLUSH],[1],[Have ftdi_tcioflush function])],[
AC_CHECK_LIB([ftdi1],[ftdi_tcioflush],[
AC_DEFINE([HAVE_FTDI_TCIOFLUSH],[1],[Have ftdi_tcioflush function])
])
])
fi
use_system_libasicamera2=no
if test "$checkSystemLibasicamera" == "yes"
then
if `$PKG_CONFIG --exists libasicamera2`; then
AC_MSG_NOTICE([Using system libASICamera2 library])
flags=`$PKG_CONFIG --cflags-only-I libasicamera2`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBASI2_CFLAGS="$flags"
# can't use shared libASICamera2 if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
# LIBASI2_LDFLAGS="`$PKG_CONFIG --libs-only-L libasicamera2`"
# LIBASI2_LIBS="`$PKG_CONFIG --libs-only-l libasicamera2`"
use_system_libasicamera2=yes
else
AC_MSG_NOTICE([Using static libASICamera2 to avoid system libusb])
LIBASI2_LDFLAGS=""
mylibdir="`$PKG_CONFIG --variable=libdir libasicamera2`"
AC_DEFINE([HAVE_STATIC_LIBASICAMERA2],[1],[Using static libASICamera2])
LIBASI2_LIBS="$mylibdir/libASICamera2.a"
fi
AC_DEFINE([HAVE_LIBASI2],[1],[Have libASICamera2])
else
AC_CHECK_LIB([ASICamera2],[ASIGetNumOfConnectedCameras],[
LIBS="-lASICamera2 $LIBS"
AC_DEFINE([HAVE_LIBASI2],[1],[Have libASICamera2])
],[
AC_DEFINE([HAVE_LIBASI2],[1],[Have libASICamera2])
AC_DEFINE([HAVE_STATIC_LIBASICAMERA2],[1],[Using static libASICamera2])
AC_MSG_WARN([No suitable version of system libASICamera2 found. Using internal version.])
])
fi
fi
use_system_libefwfilter=no
if test "$checkSystemLibefwfilter" == "yes"
then
if `$PKG_CONFIG --exists libefwfilter`; then
AC_MSG_NOTICE([Using system libEFWFilter library])
flags=`$PKG_CONFIG --cflags-only-I libefwfilter`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBZWOFW_CFLAGS="$flags"
# can't use shared libEFWFilter if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
# LIBZWOFW_LDFLAGS="`$PKG_CONFIG --libs-only-L libefwfilter`"
# LIBZWOFW_LIBS="`$PKG_CONFIG --libs-only-l libefwfilter`"
use_system_libefwfilter=yes
else
AC_MSG_NOTICE([Using static libEFWFilter to avoid system libusb])
LIBZWOFW_LDFLAGS=""
mylibdir="`$PKG_CONFIG --variable=libdir libefwfilter`"
AC_DEFINE([HAVE_STATIC_LIBEFWFILTER],[1],[Using static libEFWFilter])
LIBZWOFW_LIBS="$mylibdir/libEFWFilter.a"
fi
AC_DEFINE([HAVE_LIBZWOFW],[1],[Have libEFWFilter])
else
AC_CHECK_LIB([EFWFilter],[EFWGetNum],[
LIBS="-lEFWFilter $LIBS"
AC_DEFINE([HAVE_LIBZWOFW],[1],[Have libEFWFilter])
],[
AC_DEFINE([HAVE_LIBZWOFW],[1],[Have libEFWFilter])
AC_DEFINE([HAVE_STATIC_LIBEFWFILTER],[1],[Using static libEFWFilter])
AC_MSG_WARN([No suitable version of system libEFWFilter found. Using internal version.])
])
fi
fi
use_system_libtoupcam=no
if test "$checkSystemLibtoupcam" == "yes"
then
if `$PKG_CONFIG --exists libtoupcam`; then
AC_MSG_NOTICE([Using system libtoupcam library])
flags=`$PKG_CONFIG --cflags-only-I libtoupcam`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBTOUPCAM_CFLAGS="$flags"
# can't use shared libtoupcam if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBTOUPCAM_LDFLAGS="`$PKG_CONFIG --libs-only-L libtoupcam`"
LIBTOUPCAM_LIBS="`$PKG_CONFIG --libs-only-l libtoupcam`"
else
AC_MSG_WARN([libtoupcam not compatible with internal libusb. No support for Touptek cameras.])
fi
use_system_libtoupcam=yes
AC_DEFINE([HAVE_LIBTOUPCAM],[1],[Have libtoupcam])
else
AC_CHECK_LIB([toupcam],[Toupcam_Open],[
LIBS="-ltoupcam $LIBS"
AC_DEFINE([HAVE_LIBTOUPCAM],[1],[Have libtoupcam])
],[
AC_MSG_WARN([libtoupcam not found. Dynamic support for Touptek cameras.])
])
fi
fi
use_system_libaltaircam=no
if test "$checkSystemLibaltaircam" == "yes"
then
if `$PKG_CONFIG --exists libaltaircam`; then
AC_MSG_NOTICE([Using system libaltaircam library])
flags=`$PKG_CONFIG --cflags-only-I libaltaircam`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBALTAIRCAM_CFLAGS="$flags"
# can't use shared libaltaircam if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBALTAIRCAM_LDFLAGS="`$PKG_CONFIG --libs-only-L libaltaircam`"
LIBALTAIRCAM_LIBS="`$PKG_CONFIG --libs-only-l libaltaircam`"
else
AC_MSG_WARN([libaltaircam not compatible with internal libusb. No support for Altair cameras.])
fi
use_system_libaltaircam=yes
AC_DEFINE([HAVE_LIBALTAIRCAM],[1],[Have libaltaircam])
else
AC_CHECK_LIB([altaircam],[Altaircam_Open],[
LIBS="-laltaircam $LIBS"
AC_DEFINE([HAVE_LIBALTAIRCAM],[1],[Have libaltaircam])
],[
AC_MSG_WARN([libaltaircam not found. Dynamic support for Altair cameras.])
])
fi
fi
use_system_libaltaircamlegacy=no
if test "$checkSystemLibaltaircamlegacy" == "yes"
then
if `$PKG_CONFIG --exists libaltaircamlegacy`; then
AC_MSG_NOTICE([Using system libaltaircamlegacy library])
flags=`$PKG_CONFIG --cflags-only-I libaltaircamlegacy`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBALTAIRCAM_LEGACY_CFLAGS="$flags"
# can't use shared libaltaircamlegacy if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBALTAIRCAM_LEGACY_LDFLAGS="`$PKG_CONFIG --libs-only-L libaltaircamlegacy`"
LIBALTAIRCAM_LEGACY_LIBS="`$PKG_CONFIG --libs-only-l libaltaircamlegacy`"
else
AC_MSG_WARN([libaltaircamlegacy not compatible with internal libusb. No support for legacy Altair cameras.])
fi
use_system_libaltaircamlegacy=yes
AC_DEFINE([HAVE_LIBALTAIRCAM_LEGACY],[1],[Have libaltaircamlegacy])
else
AC_CHECK_LIB([altaircamlegacy],[Altaircam_Open],[
LIBS="-laltaircamlegacy $LIBS"
AC_DEFINE([HAVE_LIBALTAIRCAM_LEGACY],[1],[Have libaltaircamlegacy])
],[
AC_MSG_WARN([libaltaircamlegacy not found. Dynamic support for legacy Altair cameras.])
])
fi
fi
use_system_libstarshootg=no
if test "$checkSystemLibstarshootg" == "yes"
then
if `$PKG_CONFIG --exists libstarshootg`; then
AC_MSG_NOTICE([Using system libstarshootg library])
flags=`$PKG_CONFIG --cflags-only-I libstarshootg`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBSTARSHOOTG_CFLAGS="$flags"
# can't use shared libstarshootg if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBSTARSHOOTG_LDFLAGS="`$PKG_CONFIG --libs-only-L libstarshootg`"
LIBSTARSHOOTG_LIBS="`$PKG_CONFIG --libs-only-l libstarshootg`"
else
AC_MSG_WARN([libstarshootg not compatible with internal libusb. No support for Starshoot G cameras.])
fi
use_system_libstarshootg=yes
AC_DEFINE([HAVE_LIBSTARSHOOTG],[1],[Have libstarshootg])
else
AC_CHECK_LIB([starshootg],[Starshootg_Open],[
LIBS="-lstarshootg $LIBS"
AC_DEFINE([HAVE_LIBSTARSHOOTG],[1],[Have libstarshootg])
],[
AC_MSG_WARN([libstarshootg not found. Dynamic support for Starshoot G cameras.])
])
fi
fi
use_system_libnncam=no
if test "$checkSystemLibnncam" == "yes"
then
if `$PKG_CONFIG --exists libnncam`; then
AC_MSG_NOTICE([Using system libnncam library])
flags=`$PKG_CONFIG --cflags-only-I libnncam`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBNNCAM_CFLAGS="$flags"
# can't use shared libnncam if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBNNCAM_LDFLAGS="`$PKG_CONFIG --libs-only-L libnncam`"
LIBNNCAM_LIBS="`$PKG_CONFIG --libs-only-l libnncam`"
else
AC_MSG_WARN([libnncam not compatible with internal libusb. No support for Risingcam/Levenhuk cameras.])
fi
use_system_libnncam=yes
AC_DEFINE([HAVE_LIBNNCAM],[1],[Have libnncam])
else
AC_CHECK_LIB([nncam],[Nncam_Open],[
LIBS="-lnncam $LIBS"
AC_DEFINE([HAVE_LIBNNCAM],[1],[Have libnncam])
],[
AC_MSG_WARN([libnncam not found. Dynamic support for Risingcam/Levenhuk cameras.])
])
fi
fi
use_system_libomegonprocam=no
if test "$checkSystemLibomegonprocam" == "yes"
then
if `$PKG_CONFIG --exists libomegonprocam`; then
AC_MSG_NOTICE([Using system libomegonprocam library])
flags=`$PKG_CONFIG --cflags-only-I libomegonprocam`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBOMEGONPROCAM_CFLAGS="$flags"
# can't use shared libomegonprocam if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBOMEGONPROCAM_LDFLAGS="`$PKG_CONFIG --libs-only-L libomegonprocam`"
LIBOMEGONPROCAM_LIBS="`$PKG_CONFIG --libs-only-l libomegonprocam`"
else
AC_MSG_WARN([libomegonprocam not compatible with internal libusb. No support for Omegon cameras.])
fi
use_system_libomegonprocam=yes
AC_DEFINE([HAVE_LIBOMEGONPROCAM],[1],[Have libomegonprocam])
else
AC_CHECK_LIB([omegonprocam],[Omegonprocam_Open],[
LIBS="-lomegonprocam $LIBS"
AC_DEFINE([HAVE_LIBOMEGONPROCAM],[1],[Have libomegonprocam])
],[
AC_MSG_WARN([libomegonprocam not found. Dynamic support for Omegon cameras.])
])
fi
fi
use_system_libmeadecam=no
if test "$checkSystemLibmeadecam" == "yes"
then
if `$PKG_CONFIG --exists libmeadecam`; then
AC_MSG_NOTICE([Using system libmeadecam library])
flags=`$PKG_CONFIG --cflags-only-I libmeadecam`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBMEADECAM_CFLAGS="$flags"
# can't use shared libmeadecam if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBMEADECAM_LDFLAGS="`$PKG_CONFIG --libs-only-L libmeadecam`"
LIBMEADECAM_LIBS="`$PKG_CONFIG --libs-only-l libmeadecam`"
else
AC_MSG_WARN([libmeadecam not compatible with internal libusb. No support for Meade cameras.])
fi
use_system_libmeadecam=yes
AC_DEFINE([HAVE_LIBMEADECAM],[1],[Have libmeadecam])
else
AC_CHECK_LIB([meadecam],[Toupcam_Open],[
LIBS="-lmeadecam $LIBS"
AC_DEFINE([HAVE_LIBMEADECAM],[1],[Have libmeadecam])
],[
AC_MSG_WARN([libmeadecam not found. Dynamic support for Meade cameras.])
])
fi
fi
use_system_libqhyccd=no
if test "$checkSystemLibqhyccd" == "yes"
then
if `$PKG_CONFIG --exists libqhyccd`; then
AC_MSG_NOTICE([Using system libqhyccd library])
flags=`$PKG_CONFIG --cflags-only-I libqhyccd`
if test "$useisystemInclude" == "yes"; then
flags=`echo "$flags" | sed 's/^-I/-isystem/'`
fi
LIBQHYCCD_CFLAGS="$flags"
# can't use shared libqhyccd if we're not using the system libusb
# because it will try to pull it in anyhow
if test "x$use_system_libusb" == "xyes"; then
LIBQHYCCD_LDFLAGS="`$PKG_CONFIG --libs-only-L libqhyccd`"
LIBQHYCCD_LIBS="`$PKG_CONFIG --libs-only-l libqhyccd`"
else
AC_MSG_WARN([libqhyccd not compatible with internal libusb. No support for QHY cameras using libqhyccd.])
fi
use_system_libqhyccd=yes
AC_DEFINE([HAVE_LIBQHYCCD],[1],[Have libqhyccd])
else
AC_CHECK_LIB([qhyccd],[InitQHYCCDResource],[
LIBS="-lqhyccd $LIBS"
AC_DEFINE([HAVE_LIBQHYCCD],[1],[Have libqhyccd])
],[
AC_MSG_WARN([libqhyccd not found. Dynamic support for QHY cameras using libqhyccd.])
])
fi
fi
use_system_libsvbcamerasdk=no
if test "$checkSystemLibsvbcamerasdk" == "yes"
then
if `$PKG_CONFIG --exists libsvbcamerasdk`; then
flags=`$PKG_CONFIG --cflags-only-I libsvbcamerasdk`
MOC_CFLAGS="$flags $MOC_CFLAGS"
if test "$useisystemInclude" == "yes"; then